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

Disassembly:
sub esp, 0x20
push ebx
push esi
push edi
mov esi, ecx
call fcn.00407590
test eax, eax
jne 0x407b7f
pop edi
pop esi
mov eax, 0xfffffffd
pop ebx
add esp, 0x20
ret 4
mov eax, dword [esi + 4]
xor ebx, ebx
cmp eax, ebx
je 0x407b98
mov edx, dword [esi + 8]
mov ecx, dword [esp + 0x30]
sub edx, eax
sar edx, 3
cmp edx, ecx
ja 0x407ba6
pop edi
pop esi
mov eax, 0xfffffffe
pop ebx
add esp, 0x20
ret 4
mov eax, dword [eax + ecx*8 + 4]
mov ecx, dword [esi + 0x28]
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
push ebx
push eax
push ecx
call edi
cmp eax, 0xffffffff
jne 0x407bc9
pop edi
pop esi
or eax, eax
pop ebx
add esp, 0x20
ret 4
mov ecx, dword [esi + 0x28]
lea edx, [esp + 0x18]
push ebx
push edx
lea eax, [esp + 0x24]
push 0x10
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x407bf2
pop edi
pop esi
mov eax, 0xfffffffa
pop ebx
add esp, 0x20
ret 4
mov edx, dword [esi + 4]
mov eax, dword [esp + 0x30]
push ebx
push ebx
mov ecx, dword [edx + eax*8 + 4]
mov edx, dword [esi + 0x28]
push ecx
push edx
call edi
mov edx, dword [esi + 0x28]
lea eax, [esp + 0xc]
push ebx
push eax
lea ecx, [esp + 0x24]
push 0x10
push ecx
push edx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x407dcd
cmp dword [esp + 0xc], 0x10
jne 0x407dcd
mov eax, dword [esi + 0x18]
mov ecx, dword [esi + 0x1c]
add esi, 0x10
sub ecx, eax
sar ecx, 2
cmp ecx, 1
mov edi, eax
jae 0x407d1d
mov edx, dword [esi + 4]
cmp edx, ebx
je 0x407c68
mov ecx, eax
sub ecx, edx
sar ecx, 2
cmp ecx, 1
ja 0x407c6d
mov ecx, 1
cmp edx, ebx
jne 0x407c75
xor eax, eax
jmp 0x407c7a
sub eax, edx
sar eax, 2
add eax, ecx
cmp eax, ebx
mov dword [esp + 0x14], eax
jge 0x407c86
xor eax, eax
lea edx, [eax*4]
push ebp
push edx
call fcn.0042829e
mov ebx, dword [esi + 4]
add esp, 4
cmp ebx, edi
mov dword [esp + 0x14], eax
mov ebp, eax
je 0x407cb8
push ebx
push ebp
call fcn.00408220
add ebx, 4
add esp, 8
add ebp, 4
cmp ebx, edi
jne 0x407ca4
lea eax, [esp + 0x34]
mov ecx, esi
push eax
push 1
push ebp
call fcn.004081d0
mov ecx, dword [esi + 8]
add ebp, 4
push ebp
push ecx
push edi
mov ecx, esi
call fcn.004081a0
mov edx, dword [esi + 8]
mov eax, dword [esi + 4]
push edx
push eax
mov ecx, esi
call fcn.00408120
mov ecx, dword [esi + 4]
push ecx
call fcn.00427e82
mov edi, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
add esp, 4
mov ecx, esi
lea eax, [edi + edx*4]
mov dword [esi + 0xc], eax
call fcn.004080f0
lea ecx, [edi + eax*4 + 4]
mov dword [esi + 4], edi
pop ebp
mov dword [esi + 8], ecx
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x20
ret 4
mov edx, eax
sub edx, edi
sar edx, 2
cmp edx, 1
jae 0x407d7d
lea ecx, [edi + 4]
push ecx
push eax
push edi
mov ecx, esi
call fcn.004081a0
mov eax, dword [esi + 8]
lea edx, [esp + 0x30]
mov ecx, eax
push edx
sub ecx, edi
mov edx, 1
sar ecx, 2
sub edx, ecx
mov ecx, esi
push edx
push eax
call fcn.004081d0
mov eax, dword [esi + 8]
cmp edi, eax
je 0x407db9
mov ecx, dword [esp + 0x30]
mov dword [edi], ecx
add edi, 4
cmp edi, eax
jne 0x407d5c
mov eax, dword [esi + 8]
pop edi
add eax, 4
mov dword [esi + 8], eax
pop esi
xor eax, eax
pop ebx
add esp, 0x20
ret 4
push eax
push eax
add eax, 0xfffffffc
mov ecx, esi
push eax
call fcn.004081a0
mov ecx, dword [esi + 8]
lea eax, [ecx - 4]
cmp edi, eax
je 0x407da3
mov edx, dword [eax - 4]
sub eax, 4
sub ecx, 4
cmp eax, edi
mov dword [ecx], edx
jne 0x407d94
lea ecx, [edi + 4]
mov eax, edi
cmp edi, ecx
je 0x407db9
mov edx, dword [esp + 0x30]
mov dword [eax], edx
add eax, 4
cmp eax, ecx
jne 0x407dac
mov eax, dword [esi + 8]
pop edi
add eax, 4
mov dword [esi + 8], eax
pop esi
xor eax, eax
pop ebx
add esp, 0x20
ret 4
pop edi
pop esi
mov eax, 0xfffffff9
pop ebx
add esp, 0x20
ret 4