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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x474540
mov eax, dword fs:[0]
push eax
sub esp, 0x78
mov eax, dword [0x490fb0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x7c], ecx
push 0xffffffffffffffff
push 0
mov ecx, dword [ebp - 0x7c]
add ecx, 0x20
call fcn.0040b8e0
mov dword [ebp - 0x34], 0x481490
mov eax, dword [ebp - 0x7c]
mov ecx, dword [eax + 4]
and ecx, 0x40
je 0x460725
mov dword [ebp - 0x34], 0x481494
jmp 0x460737
mov edx, dword [ebp - 0x7c]
mov eax, dword [edx + 4]
and eax, 0x20
je 0x460737
mov dword [ebp - 0x34], 0x481498
mov ecx, dword [ebp - 0x7c]
mov dword [ecx], 0
mov edx, dword [ebp - 0x34]
push edx
lea ecx, [ebp + 8]
call fcn.00417d90
push eax
call dword [sym.imp.MSVCR100.dll_fopen]
add esp, 8
mov ecx, dword [ebp - 0x7c]
mov dword [ecx], eax
mov edx, dword [ebp - 0x7c]
cmp dword [edx], 0
jne 0x460770
mov ecx, dword [ebp - 0x7c]
call fcn.004604a0
jmp 0x460b5d
mov byte [ebp - 0x2d], 1
mov dword [ebp - 0x38], 0
mov eax, dword [ebp - 0x7c]
mov dword [eax + 0x18], 1
mov ecx, dword [ebp - 0x7c]
mov edx, dword [ecx + 4]
and edx, 0x10
je 0x4609f6
push 2
push 0
mov eax, dword [ebp - 0x7c]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.MSVCR100.dll_fseek]
add esp, 0xc
mov edx, dword [ebp - 0x7c]
mov eax, dword [edx]
push eax
call dword [sym.imp.MSVCR100.dll_ftell]
add esp, 4
mov ecx, dword [ebp - 0x7c]
mov dword [ecx + 0x10], eax
push 0
push 0
mov edx, dword [ebp - 0x7c]
mov eax, dword [edx]
push eax
call dword [sym.imp.MSVCR100.dll_fseek]
add esp, 0xc
mov dword [ebp - 0x3c], 0x400
mov ecx, dword [ebp - 0x7c]
mov edx, dword [ecx + 0x10]
cmp edx, dword [ebp - 0x3c]
jge 0x4607ea
mov eax, dword [ebp - 0x7c]
mov ecx, dword [eax + 0x10]
mov dword [ebp - 0x3c], ecx
cmp dword [ebp - 0x3c], 0
je 0x4609f1
mov edx, dword [ebp - 0x3c]
push edx
call sub.mfc100.dll_Ordinal_265
add esp, 4
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x68]
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x3c], 0
je 0x460835
mov ecx, dword [ebp - 0x7c]
mov edx, dword [ecx]
push edx
push 1
mov eax, dword [ebp - 0x3c]
push eax
mov ecx, dword [ebp - 0x40]
push ecx
call dword [sym.imp.MSVCR100.dll_fread]
add esp, 0x10
sub eax, 1
neg eax
sbb eax, eax
add eax, 1
mov byte [ebp - 0x2d], al
movzx edx, byte [ebp - 0x2d]
test edx, edx
je 0x4609df
mov dword [ebp - 0x44], 0
mov eax, dword [ebp - 0x7c]
mov ecx, dword [eax + 4]
and ecx, 0xfffffffa
mov edx, dword [ebp - 0x7c]
mov dword [edx + 4], ecx
mov eax, dword [ebp - 0x44]
shl eax, 4
cmp dword [eax + 0x490c50], 0
je 0x460918
mov ecx, dword [ebp - 0x44]
shl ecx, 4
mov edx, dword [ebp - 0x38]
cmp edx, dword [ecx + 0x490c54]
jge 0x4608b0
mov eax, dword [ebp - 0x38]
cmp eax, dword [ebp - 0x3c]
jge 0x4608a3
mov ecx, dword [ebp - 0x40]
add ecx, dword [ebp - 0x38]
movsx edx, byte [ecx]
mov eax, dword [ebp - 0x44]
shl eax, 4
mov ecx, dword [eax + 0x490c50]
mov eax, dword [ebp - 0x38]
movsx ecx, byte [ecx + eax]
cmp edx, ecx
je 0x4608a5
jmp 0x4608b0
mov edx, dword [ebp - 0x38]
add edx, 1
mov dword [ebp - 0x38], edx
jmp 0x46086a
mov eax, dword [ebp - 0x44]
shl eax, 4
mov ecx, dword [ebp - 0x38]
cmp ecx, dword [eax + 0x490c54]
jne 0x460903
mov edx, dword [ebp - 0x44]
shl edx, 4
mov eax, dword [ebp - 0x7c]
mov ecx, dword [eax + 4]
or ecx, dword [edx + 0x490c5c]
mov edx, dword [ebp - 0x7c]
mov dword [edx + 4], ecx
cmp dword [ebp - 0x38], 2
jne 0x4608e9
mov eax, dword [ebp - 0x7c]
mov dword [eax + 0x18], 2
mov ecx, dword [ebp - 0x44]
shl ecx, 4
mov edx, dword [ecx + 0x490c58]
push edx
mov ecx, dword [ebp - 0x7c]
add ecx, 0x3c
call fcn.00431190
jmp 0x460918
mov eax, dword [ebp - 0x44]
add eax, 1
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x38], 0
jmp 0x460857
mov ecx, dword [ebp - 0x3c]
cmp ecx, dword [ebp - 0x38]
jle 0x460935
push 0
mov edx, dword [ebp - 0x38]
push edx
mov eax, dword [ebp - 0x7c]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.MSVCR100.dll_fseek]
add esp, 0xc
cmp dword [ebp - 0x38], 0
jne 0x4609b2
lea ecx, [ebp - 0x60]
call fcn.00406200
mov dword [ebp - 4], 0
mov edx, dword [ebp - 0x3c]
push edx
mov eax, dword [ebp - 0x40]
push eax
lea ecx, [ebp - 0x60]
call fcn.0040b780
push ecx
mov ecx, esp
mov dword [ebp - 0x6c], esp
lea edx, [ebp - 0x60]
push edx
call fcn.0043e670
lea eax, [ebp - 0x2c]
push eax
call fcn.00464940
add esp, 8
mov dword [ebp - 0x80], eax
mov ecx, dword [ebp - 0x80]
mov dword [ebp - 0x84], ecx
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x84]
push edx
mov ecx, dword [ebp - 0x7c]
add ecx, 0x3c
call fcn.0043e960
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x2c]
call fcn.00406270
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x60]
call fcn.00406270
mov ecx, dword [ebp - 0x7c]
add ecx, 0x3c
call fcn.00468a00
movzx eax, al
test eax, eax
je 0x4609df
mov ecx, dword [ebp - 0x40]
movsx edx, byte [ecx]
cmp edx, 0x3c
jne 0x4609df
push 0x48149c
mov ecx, dword [ebp - 0x7c]
add ecx, 0x3c
call fcn.00431190
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x70], eax
mov ecx, dword [ebp - 0x70]
push ecx
call sub.mfc100.dll_Ordinal_266
add esp, 4
jmp 0x460aee
mov edx, dword [ebp - 0x7c]
mov eax, dword [edx + 4]
and eax, 0x20
je 0x460aee
mov ecx, dword [ebp - 0x7c]
mov edx, dword [ecx + 4]
and edx, 0x40
je 0x460a38
push 2
push 0
mov eax, dword [ebp - 0x7c]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.MSVCR100.dll_fseek]
add esp, 0xc
mov edx, dword [ebp - 0x7c]
mov eax, dword [edx]
push eax
call dword [sym.imp.MSVCR100.dll_ftell]
add esp, 4
mov ecx, dword [ebp - 0x7c]
mov dword [ecx + 0x10], eax
mov dword [ebp - 0x64], 0
mov edx, dword [ebp - 0x64]
shl edx, 4
cmp dword [edx + 0x490c50], 0
je 0x460aee
mov eax, dword [ebp - 0x64]
shl eax, 4
mov ecx, dword [ebp - 0x7c]
mov edx, dword [ecx + 4]
and edx, dword [eax + 0x490c5c]
je 0x460ae0
mov eax, dword [ebp - 0x64]
shl eax, 4
mov ecx, dword [eax + 0x490c54]
mov dword [ebp - 0x38], ecx
cmp dword [ebp - 0x38], 2
jne 0x460a85
mov edx, dword [ebp - 0x7c]
mov dword [edx + 0x18], 2
mov eax, dword [ebp - 0x64]
shl eax, 4
mov ecx, dword [eax + 0x490c58]
push ecx
mov ecx, dword [ebp - 0x7c]
add ecx, 0x3c
call fcn.00431190
mov edx, dword [ebp - 0x7c]
cmp dword [edx + 0x10], 0
je 0x460aaf
mov dword [ebp - 0x38], 0
jmp 0x460ade
mov eax, dword [ebp - 0x7c]
mov ecx, dword [eax]
push ecx
push 1
mov edx, dword [ebp - 0x38]
push edx
mov eax, dword [ebp - 0x64]
shl eax, 4
mov ecx, dword [eax + 0x490c50]
push ecx
call dword [sym.imp.MSVCR100.dll_fwrite]
add esp, 0x10
sub eax, 1
neg eax
sbb eax, eax
add eax, 1
mov byte [ebp - 0x2d], al
jmp 0x460aee
mov edx, dword [ebp - 0x64]
add edx, 1
mov dword [ebp - 0x64], edx
jmp 0x460a3f
movzx eax, byte [ebp - 0x2d]
test eax, eax
jne 0x460b00
mov ecx, dword [ebp - 0x7c]
call fcn.004604a0
jmp 0x460b5d
mov ecx, dword [ebp - 0x7c]
mov edx, dword [ecx + 4]
and edx, 0x40
je 0x460b19
mov eax, dword [ebp - 0x7c]
mov ecx, dword [ebp - 0x7c]
mov edx, dword [ecx + 0x10]
mov dword [eax + 0x14], edx
jmp 0x460b22
mov eax, dword [ebp - 0x7c]
mov ecx, dword [ebp - 0x38]
mov dword [eax + 0x14], ecx
cmp dword [ebp - 0x38], 0
je 0x460b5a
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0
push ecx
mov ecx, esp
mov dword [ebp - 0x74], esp
push 0
call fcn.00405aa0
push ecx
mov ecx, esp
mov dword [ebp - 0x78], esp
push 0x4814a4
call fcn.00405aa0
mov edx, dword [ebp - 0x7c]
add edx, 0x20
push edx
call fcn.0045e3c0
add esp, 0x18
mov al, byte [ebp - 0x2d]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0046cdbc
mov esp, ebp
pop ebp
ret 4