Function at 0x461580
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x318
mov eax, dword [0x4f6fc0]
xor eax, ebp
mov dword [ebp - 4], eax
mov al, byte [0x54beed]
mov byte [ebp - 0x114], al
push 0x103
push 0
lea ecx, [ebp - 0x113]
push ecx
call fcn.004b6780
add esp, 0xc
mov dword [ebp - 0x304], 0
mov dword [ebp - 0x2fc], 0
mov dword [ebp - 0x2f8], 0
mov dword [ebp - 0x2f4], 0
mov dword [ebp - 0x2e0], 0
cmp dword [0x54beb8], 0
je 0x461608
mov edx, dword [0x54beb8]
push edx
call fcn.004b6bd9
add esp, 4
mov dword [0x54beb8], 0
push 0x1861480
push 0x5c
mov eax, dword [0x4f9928]
imul eax, eax, 0x127c
add eax, 0x14b6412
push eax
push 0x5c
push 0x4f93d8
push str._s_c_s.cls_c_s.dzp
lea ecx, [ebp - 0x114]
push ecx
call fcn.004b6e08
add esp, 0x1c
cmp dword [0x54e958], 1
jne 0x461666
cmp dword [0x54e964], 0
je 0x461666
push 0x526f50
push str._slocal.dzp
lea edx, [ebp - 0x114]
push edx
call fcn.004b6e08
add esp, 0xc
cmp dword [0x527380], 0
jne 0x46167b
movsx eax, word [0x186eeca]
cmp eax, 1
jne 0x4616a6
push 0x5c
push 0x1861480
push 0x5c
push 0x4f93d8
call fcn.0042b620
add esp, 4
push eax
push str._s_c_s_clocal.dzp
lea ecx, [ebp - 0x114]
push ecx
call fcn.004b6e08
add esp, 0x18
push 0x4e8458
lea edx, [ebp - 0x114]
push edx
call fcn.0041a470
add esp, 8
mov dword [ebp - 0x2e0], eax
cmp dword [ebp - 0x2e0], 0
je 0x461c75
xor eax, eax
mov word [ebp - 0x308], ax
xor ecx, ecx
mov word [ebp - 0x2ec], cx
mov dword [ebp - 0x310], 0
mov dword [ebp - 0x318], 0
mov dword [ebp - 0x2e8], 0
mov dword [ebp - 0x2e4], 0
mov dword [ebp - 0x2f0], 0
mov dword [ebp - 0x30c], 0
mov dl, byte [0x54beee]
mov byte [ebp - 0x214], dl
push 0xfe
push 0
lea eax, [ebp - 0x213]
push eax
call fcn.004b6780
add esp, 0xc
mov cl, byte [0x54beef]
mov byte [ebp - 0x10], cl
xor edx, edx
mov dword [ebp - 0xf], edx
mov dword [ebp - 0xb], edx
mov dword [ebp - 0x300], 0
push 0xc8
push 0
lea eax, [ebp - 0x2dc]
push eax
call fcn.004b6780
add esp, 0xc
mov ecx, dword [ebp - 0x2e0]
push ecx
push 1
push 2
lea edx, [ebp - 0x308]
push edx
call fcn.004b8e47
add esp, 0x10
mov eax, dword [ebp - 0x2e0]
push eax
push 1
push 2
lea ecx, [ebp - 0x2ec]
push ecx
call fcn.004b8e47
add esp, 0x10
mov edx, dword [ebp - 0x2e0]
push edx
push 1
push 4
push 0x54bebc
call fcn.004b8e47
add esp, 0x10
mov eax, dword [ebp - 0x2e0]
push eax
push 1
push 2
push 0x54beb0
call fcn.004b8e47
add esp, 0x10
mov ecx, dword [ebp - 0x2e0]
push ecx
push 1
push 2
push 0x4e7c1c
call fcn.004b8e47
add esp, 0x10
movsx edx, word [ebp - 0x308]
and edx, 0xff
jne 0x461839
mov dword [ebp - 0x30c], 1
lea eax, [ebp - 0x2ec]
push eax
call fcn.00412080
add esp, 4
push 0x54bebc
call fcn.00411ff0
add esp, 4
push 0x54beb0
call fcn.00412080
add esp, 4
push 0x4e7c1c
call fcn.00412080
add esp, 4
mov ecx, dword [ebp - 0x2e0]
push ecx
push 1
push 8
lea edx, [ebp - 0x10]
push edx
call fcn.004b8e47
add esp, 0x10
mov eax, 1
shl eax, 3
mov dword [ebp - 0x314], eax
cmp dword [ebp - 0x314], 9
jae 0x461869
jmp 0x46186e
call fcn.004b64ae
mov ecx, dword [ebp - 0x314]
mov byte [ebp + ecx - 0x10], 0
movsx edx, word [ebp - 0x2ec]
mov dword [0x54beb4], edx
mov eax, dword [0x54beb4]
shl eax, 2
mov dword [ebp - 0x310], eax
mov ecx, dword [ebp - 0x310]
push ecx
call fcn.004b6c11
add esp, 4
mov dword [0x54beb8], eax
cmp dword [0x54beb8], 0
je 0x46191d
mov edx, dword [ebp - 0x2e0]
push edx
push 1
mov eax, dword [ebp - 0x310]
push eax
mov ecx, dword [0x54beb8]
push ecx
call fcn.004b8e47
add esp, 0x10
cmp dword [ebp - 0x30c], 0
je 0x46191d
mov dword [ebp - 0x2e8], 0
jmp 0x4618f4
mov edx, dword [ebp - 0x2e8]
add edx, 1
mov dword [ebp - 0x2e8], edx
movsx eax, word [ebp - 0x2ec]
cmp dword [ebp - 0x2e8], eax
jge 0x46191d
mov ecx, dword [ebp - 0x2e8]
mov edx, dword [0x54beb8]
lea eax, [edx + ecx*4]
push eax
call fcn.00411ff0
add esp, 4
jmp 0x4618e5
movsx ecx, word [0x4e7c1c]
movsx edx, word [0x54beb0]
lea eax, [ecx + edx - 1]
mov dword [ebp - 0x2e4], eax
mov ecx, dword [ebp - 0x2e4]
cmp ecx, dword [0x54beb4]
jl 0x461957
mov edx, dword [ebp - 0x2e4]
sub edx, dword [0x54beb4]
mov dword [ebp - 0x2e4], edx
jmp 0x461935
mov dword [ebp - 0x2f0], 0xffffffff
mov dword [ebp - 0x2e8], 0
jmp 0x46197c
mov eax, dword [ebp - 0x2e8]
add eax, 1
mov dword [ebp - 0x2e8], eax
mov ecx, dword [ebp - 0x2e8]
cmp ecx, dword [0x54beb4]
jge 0x461c5c
mov edx, dword [ebp - 0x2e4]
add edx, 1
mov dword [ebp - 0x2e4], edx
mov eax, dword [ebp - 0x2e4]
cmp eax, dword [0x54beb4]
jl 0x4619b5
mov dword [ebp - 0x2e4], 0
mov ecx, dword [ebp - 0x2e4]
mov edx, dword [0x54beb8]
cmp dword [edx + ecx*4], 0
jne 0x4619c9
jmp 0x46196d
mov eax, dword [ebp - 0x2f0]
add eax, 1
mov dword [ebp - 0x2f0], eax
mov ecx, dword [ebp - 0x2f0]
cmp ecx, dword [ebp + 8]
jne 0x461c57
mov edx, dword [ebp - 0x2e4]
mov eax, dword [0x54beb8]
mov ecx, dword [eax + edx*4]
mov dword [ebp - 0x318], ecx
push 0
mov edx, dword [ebp - 0x318]
push edx
mov eax, dword [ebp - 0x2e0]
push eax
call fcn.004b8f82
add esp, 0xc
mov ecx, dword [ebp - 0x2e0]
push ecx
push 1
push 0x14
lea edx, [ebp - 0x2dc]
push edx
call fcn.004b8e47
add esp, 0x10
push 0
push 3
lea eax, [ebp - 0x2dc]
push eax
call fcn.00411510
add esp, 0xc
movsx ecx, word [ebp - 0x2dc]
cmp ecx, 0x802
jg 0x461a8e
movsx edx, word [ebp - 0x2da]
cmp edx, 0xc
jg 0x461a8e
movsx eax, word [ebp - 0x2d8]
cmp eax, 0x1f
jg 0x461a8e
movsx ecx, word [ebp - 0x2dc]
cmp ecx, 0x76c
jl 0x461a8e
movsx edx, word [ebp - 0x2da]
cmp edx, 1
jl 0x461a8e
movsx eax, word [ebp - 0x2d8]
cmp eax, 1
jge 0x461aa2
mov ecx, dword [ebp - 0x2f0]
sub ecx, 1
mov dword [ebp - 0x2f0], ecx
jmp 0x46196d
mov edx, dword [ebp - 0x2e0]
push edx
push 1
push 4
lea eax, [ebp - 0x2f4]
push eax
call fcn.004b8e47
add esp, 0x10
mov ecx, dword [ebp - 0x2e0]
push ecx
push 1
push 4
lea edx, [ebp - 0x2f8]
push edx
call fcn.004b8e47
add esp, 0x10
cmp dword [ebp - 0x30c], 0
je 0x461afd
lea eax, [ebp - 0x2f4]
push eax
call fcn.00411ff0
add esp, 4
lea ecx, [ebp - 0x2f8]
push ecx
call fcn.00411ff0
add esp, 4
cmp dword [ebp - 0x2f4], 0
jle 0x461b23
cmp dword [ebp - 0x2f8], 0x2c
jg 0x461b23
mov edx, dword [ebp - 0x2f0]
sub edx, 1
mov dword [ebp - 0x2f0], edx
jmp 0x46196d
cmp dword [ebp - 0x2f4], 0
jle 0x461c55
cmp dword [ebp - 0x2f8], 0
jle 0x461c55
mov eax, dword [ebp - 0x2f4]
push eax
call fcn.004b6c11
add esp, 4
mov dword [ebp - 0x2fc], eax
mov ecx, dword [ebp - 0x2f8]
push ecx
call fcn.004b6c11
add esp, 4
mov dword [ebp - 0x304], eax
mov edx, dword [ebp - 0x2e0]
push edx
push 1
mov eax, dword [ebp - 0x2f4]
push eax
mov ecx, dword [ebp - 0x2fc]
push ecx
call fcn.004b8e47
add esp, 0x10
mov edx, dword [ebp - 0x2f4]
push edx
mov eax, dword [ebp - 0x2fc]
push eax
lea ecx, [ebp - 0x2f8]
push ecx
mov edx, dword [ebp - 0x304]
push edx
call fcn.004ac290
add esp, 0x10
push 0x4e8470
push 0x4fa370
push 0x4e84c0
lea eax, [ebp - 0x214]
push eax
call fcn.004b6e08
add esp, 0x10
push 0x4e847c
lea ecx, [ebp - 0x214]
push ecx
call fcn.0041a470
add esp, 8
mov dword [ebp - 0x300], eax
cmp dword [ebp - 0x300], 0
je 0x461c23
mov edx, dword [ebp - 0x300]
push edx
push 1
mov eax, dword [ebp - 0x2f8]
push eax
mov ecx, dword [ebp - 0x304]
push ecx
call fcn.004b9519
add esp, 0x10
mov edx, dword [ebp - 0x300]
push edx
call fcn.00419ca0
add esp, 4
mov dword [ebp - 0x300], 0
mov eax, dword [ebp - 0x2fc]
push eax
call fcn.004b6bd9
add esp, 4
mov dword [ebp - 0x2fc], 0
mov ecx, dword [ebp - 0x304]
push ecx
call fcn.004b6bd9
add esp, 4
mov dword [ebp - 0x304], 0
jmp 0x461c5c
jmp 0x46196d
mov edx, dword [ebp - 0x2e0]
push edx
call fcn.00419ca0
add esp, 4
mov dword [ebp - 0x2e0], 0
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b6253
mov esp, ebp
pop ebp
ret