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

Disassembly:
mov eax, 0x414fdc
call fcn.00414de8
sub esp, 0xc
push ebx
push esi
xor ebx, ebx
cmp dword [ebp + 0xc], ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, ecx
mov dword [ebp - 0x18], ebx
push ebx
je 0x409f04
lea eax, [ebp - 0x10]
push eax
push 4
lea eax, [esi + 0x18]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
lea eax, [ebp - 0x10]
push eax
push 4
lea eax, [esi + 0xa654]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
lea eax, [ebp - 0x10]
push eax
push 4
lea eax, [esi + 0xa658]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
lea eax, [ebp - 0x10]
push eax
push 4
lea eax, [esi + 0xa65c]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
lea eax, [ebp - 0x10]
push eax
push 4
lea eax, [esi + 0xa660]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
lea eax, [ebp - 0x10]
push eax
push 4
lea eax, [esi + 0xa664]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x409fab
lea ecx, [ebp - 0x10]
push ecx
push 4
lea eax, [esi + 0x18]
push eax
push dword [ebp + 8]
call edi
test eax, eax
jne 0x409f1a
mov dword [esi + 0x18], ebx
push ebx
lea ecx, [ebp - 0x10]
push ecx
push 4
lea eax, [esi + 0xa654]
push eax
push dword [ebp + 8]
call edi
test eax, eax
jne 0x409f37
mov dword [esi + 0xa654], ebx
push ebx
lea ecx, [ebp - 0x10]
push ecx
push 4
lea eax, [esi + 0xa658]
push eax
push dword [ebp + 8]
call edi
test eax, eax
jne 0x409f54
mov dword [esi + 0xa658], ebx
push ebx
lea ecx, [ebp - 0x10]
push ecx
push 4
lea eax, [esi + 0xa65c]
push eax
push dword [ebp + 8]
call edi
test eax, eax
jne 0x409f71
mov dword [esi + 0xa65c], ebx
push ebx
lea ecx, [ebp - 0x10]
push ecx
push 4
lea eax, [esi + 0xa660]
push eax
push dword [ebp + 8]
call edi
test eax, eax
jne 0x409f8e
mov dword [esi + 0xa660], ebx
push ebx
lea ecx, [ebp - 0x10]
push ecx
push 4
lea eax, [esi + 0xa664]
push eax
push dword [ebp + 8]
call edi
test eax, eax
jne 0x40a003
mov dword [esi + 0xa664], ebx
cmp dword [ebp + 0xc], ebx
je 0x40a003
push ebx
lea eax, [ebp - 0x10]
push eax
push 4
lea edi, [esi + 0xa678]
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [edi], ebx
mov dword [ebp - 0x14], ebx
jbe 0x40a0b5
push dword [ebp + 0xc]
mov eax, dword [esi + 0xa67c]
mov ecx, dword [ebp - 0x14]
push dword [ebp + 8]
mov ecx, dword [eax + ecx*4]
call fcn.00414063
cmp eax, ebx
mov dword [ebp - 0x18], eax
je 0x40a0b5
inc dword [ebp - 0x14]
mov eax, dword [ebp - 0x14]
cmp eax, dword [edi]
jb 0x409fd2
jmp 0x40a0b5
push ebx
lea ecx, [ebp - 0x10]
push ecx
push 4
lea eax, [esi + 0xa678]
push eax
push dword [ebp + 8]
call edi
test eax, eax
jne 0x40a020
mov dword [esi + 0xa678], ebx
lea edi, [esi + 0xa678]
mov eax, dword [edi]
lea eax, [eax*4 + 4]
push eax
push dword [esi + 0xa67c]
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
cmp eax, ebx
je 0x40a0b2
cmp dword [edi], ebx
mov dword [esi + 0xa67c], eax
mov dword [ebp - 0x14], ebx
jbe 0x40a0b5
push 0x87c
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov dword [ebp + 0xc], eax
cmp eax, ebx
mov dword [ebp - 4], ebx
je 0x40a073
mov ecx, eax
call fcn.00412f88
jmp 0x40a075
xor eax, eax
mov ecx, dword [ebp - 0x14]
mov edx, dword [esi + 0xa67c]
or dword [ebp - 4], 0xffffffff
shl ecx, 2
mov dword [ecx + edx], eax
mov eax, dword [esi + 0xa67c]
add eax, ecx
cmp dword [eax], ebx
je 0x40a0b2
mov ecx, dword [eax]
push ebx
push dword [ebp + 8]
call fcn.00414063
cmp eax, ebx
mov dword [ebp - 0x18], eax
je 0x40a0b5
inc dword [ebp - 0x14]
mov eax, dword [ebp - 0x14]
cmp eax, dword [edi]
jb 0x40a055
jmp 0x40a0b5
mov dword [ebp - 0x18], ebx
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x18]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 8