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

Disassembly:
push ebp
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x44c
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x38], 0
call fcn.00452f30
mov ecx, eax
mov dword [esp + 0x20], eax
lea eax, [esp + 0x38]
mov dword [esp], ecx
mov dword [esp + 4], eax
call fcn.00415fa0
cmp eax, 0xffffffff
je 0x40eae5
mov dword [esp], ebx
mov esi, eax
call fcn.00451230
mov eax, dword [ebx + 8]
test eax, eax
je 0x40e9b0
xor ebp, ebp
lea edi, [esp + 0x40]
jmp 0x40e93b
add ebp, dword [esp + 0x40]
mov eax, dword [ebx + 8]
cmp eax, ebp
jbe 0x40e9b0
sub eax, ebp
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edi
mov dword [esp + 8], eax
mov eax, dword [ebx]
mov dword [esp], esi
add eax, ebp
mov dword [esp + 4], eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
sub esp, 0x14
test eax, eax
jne 0x40e930
mov eax, dword [esp + 0x24]
mov dword [eax], 0
mov eax, dword [esp + 0x28]
mov dword [eax], 0
mov eax, dword [esp + 0x38]
xor ebx, ebx
mov dword [esp], eax
call fcn.00450510
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call fcn.00450510
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
add esp, 0x44c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x460]
test eax, eax
je 0x40ea40
mov dword [esp + 8], 0
mov dword [esp + 4], 0x14
mov dword [esp], 1
call fcn.00450480
mov dword [esp], esi
mov ebx, eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov dword [esp + 4], 0x40ef10
call fcn.00416e20
mov dword [ebx + 4], esi
mov dword [ebx], eax
call fcn.00451190
mov dword [ebx + 8], eax
mov eax, dword [esp + 0x460]
mov dword [ebx + 0xc], eax
mov eax, dword [esp + 0x464]
mov dword [ebx + 0x10], eax
mov eax, dword [esp + 0x38]
mov dword [esp], eax
call fcn.00450510
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call fcn.00450510
add esp, 0x44c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
call fcn.00451190
lea edi, [esp + 0x40]
mov ebx, eax
lea ebp, [esp + 0x3c]
jmp 0x40ea66
mov ecx, dword [esp + 0x3c]
mov edx, edi
mov eax, ebx
call fcn.0040e880
test eax, eax
jne 0x40eb20
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ebp
mov dword [esp + 8], 0x400
mov dword [esp + 4], edi
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
sub esp, 0x14
test eax, eax
jne 0x40ea51
mov eax, dword [esp + 0x24]
mov dword [eax], 0
mov eax, dword [esp + 0x28]
mov dword [eax], 0
mov eax, dword [esp + 0x38]
mov dword [esp], eax
call fcn.00450510
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call fcn.00450510
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
test ebx, ebx
je 0x40e99f
mov dword [esp], ebx
xor ebx, ebx
call fcn.004511a0
add esp, 0x44c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x24]
xor ebx, ebx
mov dword [eax], 0
mov eax, dword [esp + 0x28]
mov dword [eax], 0
mov eax, dword [esp + 0x38]
mov dword [esp], eax
call fcn.00450510
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call fcn.00450510
jmp 0x40e99f
cmp eax, 0xffffffff
mov dword [esp + 0x2c], eax
je 0x40ea8e
mov dword [esp], ebx
call fcn.004511e0
mov edx, dword [esp + 0x24]
mov dword [edx], eax
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
mov dword [eax], edx
jmp 0x40e979