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

Disassembly:
push ebp
push edi
push esi
push ebx
push eax
mov eax, 0x1068
call fcn.00457320
sub esp, eax
mov edi, dword [esp + 0x1084]
mov esi, dword [esp + 0x1080]
mov eax, dword [esp + eax]
mov ebx, edi
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], edi
or ebx, esi
je 0x406145
mov dword [esp + 0x3c], eax
mov dword [esp + 0x48], 0
mov edi, edx
mov dword [esp + 0x4c], 0
lea esi, [esi]
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x3c]
mov edx, dword [esp + 0x30]
cmp ecx, 0
mov eax, dword [eax + 8]
mov ebx, edx
ja 0x405ece
cmp ebx, 0x1000
jbe 0x405ed3
mov ebx, 0x1000
lea esi, [esp + 0x5c]
lea ecx, [esp + 0x60]
mov dword [esp + 0x5c], 0
mov dword [esp + 0x10], 0
mov dword [esp + 8], ebx
mov dword [esp + 0xc], esi
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
sub esp, 0x14
mov eax, dword [esp + 0x5c]
test eax, eax
mov dword [esp + 0x38], eax
je 0x4060e0
mov eax, dword [esp + 0x3c]
mov ecx, dword [eax + 4]
test ecx, ecx
je 0x405f43
mov edx, dword [eax + 0x1c]
mov eax, dword [eax + 0x18]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0xc], edx
mov dword [esp + 4], eax
lea eax, [esp + 0x60]
mov dword [esp], eax
call fcn.0042bca0
sub esp, 0x10
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
mov esi, eax
mov dword [esp + 0x40], eax
sar esi, 0x1f
add dword [ecx + 0x18], eax
adc dword [ecx + 0x1c], esi
test eax, eax
mov dword [esp + 0x44], esi
jle 0x4060af
mov edx, dword [edi + 8]
lea esi, [esp + 0x60]
lea ebp, [esp + 0x60]
add esi, eax
cmp edx, 0xffffffff
mov dword [esp + 0x28], esi
jne 0x405f9a
jmp 0x406070
lea edx, [eax + 1]
mov ebx, esi
mov dword [edi + 0x18], edx
mov byte [edi + eax + 0x1c], bl
cmp ebp, dword [esp + 0x28]
je 0x406080
mov edx, dword [edi + 8]
add ebp, 1
cmp edx, 0xffffffff
movzx esi, byte [ebp - 1]
je 0x4060c2
mov eax, dword [edi + 0x18]
cmp eax, 0xffff
jbe 0x405f81
mov ebx, dword [edi + 4]
test ebx, ebx
je 0x4060d0
lea eax, [esp + 0x5c]
mov dword [esp], edx
mov dword [esp + 0x5c], 0
mov dword [esp + 0xc], 1
mov dword [esp + 4], 0
xor ebx, ebx
mov dword [esp + 8], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
sub esp, 0x10
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x5c]
mov ecx, dword [esp + 0x2c]
mov edx, eax
xor eax, eax
add ecx, eax
adc ebx, edx
add ecx, dword [edi + 0x10]
lea edx, [edi + 0x1c]
adc ebx, dword [edi + 0x14]
mov dword [esp + 0x2c], edx
mov dword [esp + 8], ecx
mov dword [esp + 0xc], ebx
mov eax, dword [edi + 0x18]
mov dword [esp], edx
mov dword [esp + 4], eax
mov ecx, dword [edi + 4]
call fcn.0042bca0
mov edx, dword [edi + 8]
mov eax, dword [edi + 0x18]
sub esp, 0x10
mov dword [esp + 8], eax
mov eax, dword [esp + 0x2c]
lea ecx, [esp + 0x5c]
mov dword [esp], edx
mov dword [esp + 0x5c], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ecx
mov dword [esp + 4], eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, 1
sub esp, 0x14
xor eax, eax
jmp 0x405f84
mov eax, dword [esp + 0x40]
add dword [edi + 0x10], eax
mov edx, dword [esp + 0x44]
adc dword [edi + 0x14], edx
nop
mov eax, dword [esp + 0x40]
add dword [esp + 0x48], eax
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x44]
adc dword [esp + 0x4c], edx
cdq
sub dword [esp + 0x30], eax
mov eax, dword [esp + 0x30]
sbb dword [esp + 0x34], edx
mov edx, dword [esp + 0x34]
mov ebx, edx
or ebx, eax
jne 0x405eb0
mov eax, dword [esp + 0x48]
mov edx, dword [esp + 0x4c]
add esp, 0x106c
pop ebx
pop esi
pop edi
pop ebp
ret
add dword [edi + 0x10], 1
adc dword [edi + 0x14], 0
jmp 0x405f8d
lea ebx, [edi + 0x1c]
mov dword [esp + 0x2c], ebx
jmp 0x406031
mov esi, dword [esp + 0x3c]
mov dword [esp], 0
mov dword [esp + 4], 0
mov ecx, esi
call fcn.00405b90
mov eax, dword [esi + 8]
sub esp, 8
lea esi, [esp + 0x5c]
mov dword [esp + 8], ebx
lea ebx, [esp + 0x60]
mov dword [esp + 0x5c], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], esi
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
sub esp, 0x14
mov eax, dword [esp + 0x5c]
test eax, eax
mov dword [esp + 0x38], eax
je 0x4060af
jmp 0x405f13
mov dword [esp + 0x48], 0
mov dword [esp + 0x4c], 0
jmp 0x4060af