Function at 0x40e170
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x128
mov eax, dword [0x42f060]
xor eax, ebp
mov dword [ebp - 8], eax
mov dword [ebp - 0x128], ecx
mov eax, dword [ebp - 0x128]
cmp dword [eax + 0x224], 0
je 0x40e1d9
mov ecx, dword [ebp - 0x128]
mov edx, dword [ecx + 0x224]
mov dword [ebp - 0x120], edx
mov eax, dword [ebp - 0x120]
push eax
call fcn.00416b38
add esp, 4
mov ecx, dword [ebp - 0x128]
mov dword [ecx + 0x224], 0
mov edx, dword [ebp - 0x128]
mov dword [edx + 0x220], 0
mov ecx, dword [ebp - 0x128]
call fcn.0040df20
movzx eax, al
test eax, eax
jne 0x40e1f2
xor al, al
jmp 0x40e403
mov ecx, dword [ebp - 0x128]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x128]
mov eax, dword [edx + 0x18]
call eax
movzx ecx, al
test ecx, ecx
je 0x40e235
mov edx, dword [ebp - 0x128]
mov eax, dword [edx + 0xc]
mov ecx, dword [eax + 0x10]
push ecx
lea edx, [ebp - 0x110]
push edx
mov eax, dword [ebp - 0x128]
mov edx, dword [eax]
mov ecx, dword [ebp - 0x128]
mov eax, dword [edx + 0x3c]
call eax
jmp 0x40e25e
push 0
mov ecx, dword [ebp - 0x128]
mov edx, dword [ecx + 0x10]
mov eax, dword [edx + 0x10]
push eax
lea ecx, [ebp - 0x110]
push ecx
mov edx, dword [ebp - 0x128]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x128]
mov edx, dword [eax + 0x44]
call edx
mov ecx, dword [ebp - 0x128]
call fcn.0040e110
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x114], eax
cmp dword [ebp - 0x114], 0xffffffff
jne 0x40e29e
xor al, al
jmp 0x40e403
mov dword [ebp - 0x118], 0
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x118]
push ecx
mov edx, dword [ebp - 0x114]
push edx
mov ecx, dword [ebp - 0x128]
call fcn.0040e4b0
movzx eax, al
test eax, eax
je 0x40e3cd
mov ecx, dword [ebp - 0x118]
add ecx, 0x10
mov dword [ebp - 0x118], ecx
push 0
mov edx, dword [ebp - 0x114]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, dword [ebp - 0x128]
mov dword [ecx + 0x228], eax
mov edx, dword [ebp - 0x128]
cmp dword [edx + 0x228], 0
je 0x40e3cd
mov eax, dword [ebp - 0x128]
cmp dword [eax + 0x228], 0xffffffff
je 0x40e3cd
mov ecx, dword [ebp - 0x128]
mov edx, dword [ecx + 0x228]
sub edx, dword [ebp - 0x118]
mov eax, dword [ebp - 0x128]
mov dword [eax + 0x228], edx
mov ecx, dword [ebp - 0x128]
mov edx, dword [ecx + 0x228]
push edx
call fcn.00416a35
add esp, 4
mov dword [ebp - 0x124], eax
mov eax, dword [ebp - 0x128]
mov ecx, dword [ebp - 0x124]
mov dword [eax + 0x224], ecx
mov edx, dword [ebp - 0x128]
cmp dword [edx + 0x224], 0
je 0x40e3cd
push 0
push 0
mov eax, dword [ebp - 0x118]
push eax
mov ecx, dword [ebp - 0x114]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x40e3cd
push 0
lea edx, [ebp - 0x11c]
push edx
mov eax, dword [ebp - 0x128]
mov ecx, dword [eax + 0x228]
push ecx
mov edx, dword [ebp - 0x128]
mov eax, dword [edx + 0x224]
push eax
mov ecx, dword [ebp - 0x114]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebp - 4], eax
mov edx, dword [ebp - 0x114]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 4], 0
je 0x40e401
push 0
push 1
mov ecx, dword [ebp - 0x128]
call fcn.0040e420
mov ecx, dword [ebp - 0x128]
mov dword [ecx + 0x220], eax
mov al, 1
jmp 0x40e403
xor al, al
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00415aa8
mov esp, ebp
pop ebp
ret