Function at 0x4058e0
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14c
mov eax, dword [0x4710b0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x14c], eax
mov eax, dword [ebx]
push edi
mov edi, dword [ebp + 0x14]
mov dword [ebp - 0x148], ecx
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x11c], ecx
mov dword [ebp - 0x124], edx
mov dword [ebp - 0x140], edi
mov dword [ebp - 0x138], 0
test eax, eax
je 0x40594c
add eax, edi
lea edx, [eax*8]
sub edx, eax
mov eax, dword [ecx]
add edx, edx
add edx, edx
push edx
push eax
call fcn.0043e00d
add esp, 8
jmp 0x405964
add eax, edi
lea edx, [eax*8]
sub edx, eax
add edx, edx
add edx, edx
push edx
call fcn.0043e0ba
add esp, 4
mov ecx, dword [ebp - 0x11c]
mov dword [ecx], eax
mov eax, dword [ebx]
lea edx, [eax*8]
sub edx, eax
mov eax, ecx
mov ecx, dword [eax]
lea eax, [ecx + edx*4]
lea edx, [edi*8]
sub edx, edi
add edx, edx
add edx, edx
push edx
push 0
push eax
mov dword [ebp - 0x12c], eax
call fcn.004426d0
add esp, 0xc
push 0
push 0x80
push 4
push 0
push 0
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ecx, dword [ebx]
mov esi, eax
xor eax, eax
push eax
push esi
mov dword [ebp - 0x114], esi
mov dword [ebp - 0x144], eax
mov dword [ebp - 0x118], eax
mov dword [ebp - 0x128], ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push 2
push 0
push 0
push esi
mov dword [ebp - 0x13c], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x120], eax
test edi, edi
jle 0x405bab
mov edi, dword [ebp - 0x124]
mov edx, dword [ebp - 0x140]
mov dword [ebp - 0x130], 0x64
add edi, 4
mov dword [ebp - 0x124], edx
mov eax, dword [ebp - 0x148]
push edi
push eax
lea ecx, [ebp - 0x110]
push 0x468f20
push ecx
call fcn.0043f2fe
mov edx, dword [ebp + 0x18]
add esp, 0x10
push edx
lea eax, [ebp - 0x110]
push eax
lea edx, [ebp - 0x118]
lea ecx, [ebp - 0x144]
call fcn.004057b0
mov dword [ebp - 0x134], 2
test ebx, ebx
je 0x405ac1
mov ecx, dword [ebx]
mov edx, dword [ebp - 0x11c]
mov eax, dword [edx]
push 0x4036c0
push 0x1c
push ecx
push eax
lea ecx, [edi - 4]
push ecx
call fcn.0043f6ab
mov esi, eax
add esp, 0x14
test esi, esi
je 0x405ac1
mov edx, dword [ebp - 0x118]
cmp edx, dword [esi + 0x18]
ja 0x405aa6
mov eax, dword [esi]
mov dword [ebp - 0x120], eax
mov dword [ebp - 0x134], 0
jmp 0x405ae5
mov ecx, dword [ebp - 0x114]
push 2
push 0
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x120], eax
jmp 0x405ae5
mov esi, dword [ebp - 0x12c]
inc dword [ebp - 0x128]
mov edx, esi
mov eax, edi
sub edx, edi
mov cl, byte [eax]
mov byte [edx + eax + 4], cl
inc eax
test cl, cl
jne 0x405ad3
add dword [ebp - 0x12c], 0x1c
cmp dword [ebp - 0x134], 0
mov eax, dword [ebp - 0x120]
mov ecx, dword [ebp - 0x118]
mov dword [esi], eax
mov dword [esi + 0x18], ecx
jne 0x405b11
mov edx, dword [ebp - 0x114]
push 0
push 0
push eax
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp - 0x114]
mov edx, dword [ebp - 0x144]
push eax
push ecx
mov ecx, dword [ebp - 0x118]
call fcn.004056f0
cmp dword [ebp - 0x134], 0
jne 0x405b51
mov edx, dword [ebp - 0x114]
push 2
push 0
push 0
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x120], eax
jmp 0x405b62
mov eax, dword [ebp - 0x13c]
mov dword [esi], eax
add eax, dword [esi + 0x18]
mov dword [ebp - 0x13c], eax
mov eax, dword [ebp - 0x130]
cdq
idiv dword [ebp - 0x140]
cmp eax, dword [ebp - 0x138]
je 0x405b8f
mov dword [ebp - 0x138], eax
push eax
mov eax, dword [ebp - 0x14c]
mov ecx, dword [eax + 0x504]
call fcn.004124f9
add dword [ebp - 0x130], 0x64
add edi, 0x1c
dec dword [ebp - 0x124]
jne 0x405a1c
mov esi, dword [ebp - 0x114]
mov ecx, dword [ebp - 0x128]
push esi
mov dword [ebx], ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.0043db8a
mov esp, ebp
pop ebp
ret 0x14