Function at 0x407160
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov dword [ebp - 4], 0
mov dword [ebp - 0x10], 0x7863513
push 4
lea eax, [ebp - 0x10]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call fcn.00407412
add esp, 0x10
mov dword [ebp - 8], eax
push 0
push pe_nt_image_headers32
push 3
push 0
push 1
push 0xc0000000
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
je 0x407374
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x24], 0
mov ecx, dword [ebp + 0x18]
push ecx
lea edx, [ebp - 0x24]
push edx
lea eax, [ebp - 0x14]
push eax
call fcn.0040746f
add esp, 0xc
lea ecx, [ebp - 0x18]
push ecx
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x20], eax
push 0
mov eax, dword [ebp - 0x20]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
mov edx, dword [ebp - 0x14]
push edx
push 0
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x40736a
mov dword [ebp - 0x28], 0
push 0
push 0
push 0
mov ecx, dword [ebp - 0x24]
push ecx
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
je 0x407360
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
mov ecx, dword [ebp - 0x18]
or ecx, dword [ebp - 0x20]
xor edx, edx
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
jmp 0x40728a
mov eax, dword [ebp - 0x38]
add eax, 1
mov ecx, dword [ebp - 0x34]
adc ecx, 0
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], ecx
mov edx, dword [ebp - 0x34]
cmp edx, dword [ebp - 0x2c]
jg 0x40731e
jl 0x4072a0
mov eax, dword [ebp - 0x38]
cmp eax, dword [ebp - 0x30]
jae 0x40731e
mov ecx, dword [ebp + 0x14]
and ecx, 0xff
test ecx, ecx
je 0x4072e4
mov eax, dword [ebp + 0x10]
cdq
push edx
push eax
mov edx, dword [ebp - 0x34]
push edx
mov eax, dword [ebp - 0x38]
push eax
call fcn.0040eae0
mov ecx, dword [ebp - 8]
mov dl, byte [ecx + eax]
push edx
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x3c]
mov dl, byte [ecx + eax]
push edx
call fcn.0040738d
add esp, 8
mov ecx, dword [ebp - 0x38]
mov edx, dword [ebp - 0x3c]
mov byte [edx + ecx], al
jmp 0x407319
mov eax, dword [ebp + 0x10]
cdq
push edx
push eax
mov eax, dword [ebp - 0x34]
push eax
mov ecx, dword [ebp - 0x38]
push ecx
call fcn.0040eae0
mov edx, dword [ebp - 8]
mov al, byte [edx + eax]
push eax
mov ecx, dword [ebp - 0x38]
mov edx, dword [ebp - 0x3c]
mov al, byte [edx + ecx]
push eax
call fcn.004073cf
add esp, 8
mov ecx, dword [ebp - 0x38]
mov edx, dword [ebp - 0x3c]
mov byte [edx + ecx], al
jmp 0x407278
cmp dword [ebp + 0x18], 0
je 0x40734f
mov eax, dword [ebp + 0x18]
cmp dword [eax + 4], 0
je 0x40734f
mov ecx, dword [ebp + 0x18]
mov edx, dword [ecx + 8]
push edx
mov eax, dword [ebp - 0x2c]
push eax
mov ecx, dword [ebp - 0x30]
push ecx
mov edx, dword [ebp - 0x3c]
push edx
mov eax, dword [ebp + 0x18]
call dword [eax + 4]
add esp, 0x10
mov ecx, dword [ebp + 0x18]
mov dword [ecx + 0xc], eax
mov dword [ebp - 4], 1
mov edx, dword [ebp - 0x28]
push edx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 8]
mov dword [ebp - 0x40], edx
mov eax, dword [ebp - 0x40]
push eax
call fcn.0040ead0
add esp, 4
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret