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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x446db8
mov eax, dword fs:[0]
push eax
sub esp, 0x9c
mov eax, dword [0x45b4b8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x70], esi
mov edi, dword [esi + 4]
mov ebx, dword [esi + 8]
cmp edi, ebx
je 0x40174b
push 0
lea eax, [ebp - 0xa4]
mov byte [ebp - 0x58], 2
push eax
push 1
lea eax, [ebp - 0x58]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x401788
mov eax, dword [edi]
push 0
mov eax, dword [eax]
mov dword [ebp - 0x68], eax
lea eax, [ebp - 0xa8]
push eax
push 4
lea eax, [ebp - 0x68]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x401788
push 0
lea eax, [ebp - 0x94]
push eax
push 4
lea eax, [ebp - 0x88]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x401773
cmp dword [ebp - 0x88], 0
je 0x40179d
push 0
lea eax, [ebp - 0x8c]
mov byte [ebp - 0x58], 1
push eax
push 1
lea eax, [ebp - 0x58]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x401788
push 0
lea eax, [ebp - 0x9c]
push eax
push 4
lea eax, [ebp - 0x78]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x401773
mov eax, dword [ebp - 0x78]
test eax, eax
je 0x40179d
mov dword [ebp - 0x68], 0
lea ecx, [ecx]
push 0x2c
call fcn.0042d5c9
mov esi, eax
mov dword [ebp - 0x60], eax
add esp, 4
test esi, esi
je 0x40150c
mov dword [esi + 0x1c], 0xf
mov dword [esi + 0x18], 0
mov byte [esi + 8], 0
mov dword [esi + 0x20], 0
mov dword [esi + 0x24], 0
mov dword [esi + 0x28], 0
jmp 0x401511
xor esi, esi
mov dword [ebp - 0x60], esi
push 0
lea eax, [ebp - 0x90]
push eax
push 4
lea eax, [ebp - 0x84]
push eax
mov eax, dword [ebp - 0x70]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x401773
mov eax, dword [ebp - 0x84]
mov dword [esi], eax
lea eax, [ebp - 0x98]
push 0
push eax
push 4
lea eax, [ebp - 0x80]
push eax
mov eax, dword [ebp - 0x70]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x401773
mov eax, dword [ebp - 0x80]
mov dword [esi + 4], eax
xor esi, esi
jmp 0x401570
push 0
lea eax, [ebp - 0xa0]
push eax
push 1
lea eax, [ebp - 0x59]
push eax
mov eax, dword [ebp - 0x70]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x401773
mov al, byte [ebp - 0x59]
mov byte [ebp + esi - 0x50], al
test al, al
je 0x4015a3
inc esi
cmp esi, 0x40
jb 0x401570
cmp byte [ebp - 0x50], 0
jne 0x4015ad
xor ecx, ecx
jmp 0x4015bc
lea ecx, [ebp - 0x50]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4015b3
sub ecx, edx
mov esi, dword [ebp - 0x60]
lea eax, [ebp - 0x50]
push ecx
push eax
lea ecx, [esi + 8]
call fcn.004028c0
mov dword [ebp - 0x6c], esi
mov dword [ebp - 4], 0
lea eax, [ebp - 0x6c]
mov ecx, dword [edi]
add ecx, 4
mov dword [ebp - 0x7c], ecx
mov edx, dword [ecx + 4]
cmp eax, edx
jae 0x40167d
cmp dword [ecx], eax
ja 0x40167d
sub eax, dword [ecx]
sar eax, 2
mov dword [ebp - 0x54], eax
mov eax, dword [ecx + 8]
mov dword [ebp - 0x64], eax
cmp edx, eax
jne 0x40165b
sub eax, edx
sar eax, 2
cmp eax, 1
jae 0x40165b
sub edx, dword [ecx]
mov eax, 0x3fffffff
sar edx, 2
sub eax, edx
cmp eax, 1
jb 0x401769
inc edx
mov dword [ebp - 0x74], edx
mov edx, dword [ebp - 0x64]
sub edx, dword [ecx]
sar edx, 2
mov eax, edx
shr eax, 1
mov dword [ebp - 0x60], eax
mov eax, 0x3fffffff
sub eax, dword [ebp - 0x60]
cmp eax, edx
jae 0x401648
xor edx, edx
jmp 0x40164b
add edx, dword [ebp - 0x60]
cmp edx, dword [ebp - 0x74]
cmovb edx, dword [ebp - 0x74]
push edx
call fcn.00402030
mov ecx, dword [ebp - 0x7c]
mov eax, dword [ecx]
mov edx, dword [ebp - 0x54]
lea edx, [eax + edx*4]
mov eax, dword [ecx + 4]
mov dword [ebp - 0x54], eax
test eax, eax
je 0x4016ea
mov eax, dword [edx]
mov dword [edx], 0
mov edx, dword [ebp - 0x54]
mov esi, dword [ebp - 0x6c]
jmp 0x4016e8
mov eax, dword [ecx + 8]
mov dword [ebp - 0x54], eax
cmp edx, eax
jne 0x4016dc
sub eax, edx
sar eax, 2
cmp eax, 1
jae 0x4016dc
sub edx, dword [ecx]
mov eax, 0x3fffffff
sar edx, 2
sub eax, edx
cmp eax, 1
jb 0x401769
inc edx
mov dword [ebp - 0x74], edx
mov edx, dword [ebp - 0x54]
sub edx, dword [ecx]
sar edx, 2
mov eax, edx
shr eax, 1
mov dword [ebp - 0x64], eax
mov eax, 0x3fffffff
sub eax, dword [ebp - 0x64]
cmp eax, edx
jae 0x4016c9
xor edx, edx
jmp 0x4016cc
add edx, dword [ebp - 0x64]
cmp edx, dword [ebp - 0x74]
cmovb edx, dword [ebp - 0x74]
push edx
call fcn.00402030
mov ecx, dword [ebp - 0x7c]
mov edx, dword [ecx + 4]
test edx, edx
je 0x4016ea
mov eax, dword [ebp - 0x60]
xor esi, esi
mov dword [edx], eax
add dword [ecx + 4], 4
mov dword [ebp - 4], 0xffffffff
test esi, esi
je 0x40172d
lea ecx, [esi + 0x20]
call fcn.00401ee0
cmp dword [esi + 0x1c], 0x10
jb 0x401712
push dword [esi + 8]
call fcn.0042d3ab
add esp, 4
mov dword [esi + 0x1c], 0xf
mov dword [esi + 0x18], 0
push esi
mov byte [esi + 8], 0
call fcn.0042d3ab
add esp, 4
mov eax, dword [ebp - 0x68]
inc eax
mov dword [ebp - 0x68], eax
cmp eax, dword [ebp - 0x78]
jb 0x4014d0
mov esi, dword [ebp - 0x70]
add edi, 4
cmp edi, ebx
jne 0x401401
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0042d3b0
mov esp, ebp
pop ebp
ret
push 0x451404
call fcn.00415f7c
push 0x459034
lea eax, [ebp - 0x54]
mov dword [ebp - 0x54], 0x451474
push eax
call fcn.0042f51b
push 0x459034
lea eax, [ebp - 0x54]
mov dword [ebp - 0x54], 0x451480
push eax
call fcn.0042f51b
xor al, al
jmp 0x40174d