Function at 0x45b510
Capabilities:
Get file size
Parse pe header
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x180
mov eax, dword [ebp + 8]
mov dword [ebp - 0x24], esp
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x14], 0x52e2dc
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x18], 0x4b6cc8
mov edx, dword fs:[0]
mov dword [ebp - 0x1c], edx
mov dword fs:[0], ecx
sub esp, 0x1c
movaps xmm0, xmmword [0x4ec6a0]
movups xmmword [esp + 4], xmm0
mov dword [esp], eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
call dword [sym.imp.KERNEL32.dll_CreateFileW]
xor esi, esi
cmp eax, 0xffffffff
je 0x45b72c
mov edi, eax
lea ebx, [ebp - 0x30]
lea eax, [ebp - 0x94]
push 0
push ebx
push 0x40
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x45b725
cmp dword [ebp - 0x30], 0x40
jne 0x45b725
movzx eax, word [ebp - 0x94]
cmp eax, 0x5a4d
jne 0x45b725
push 0
push 0
push dword [ebp - 0x58]
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, dword [ebp - 0x58]
jne 0x45b725
lea eax, [ebp - 0x18c]
push 0
push ebx
push 0xf8
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x45b725
cmp dword [ebp - 0x30], 0xf8
jne 0x45b725
cmp dword [ebp - 0x18c], 0x4550
jne 0x45b725
cmp word [ebp - 0x186], 0
je 0x45b725
mov eax, dword [ebp - 0x104]
test eax, eax
je 0x45b725
mov dword [ebp - 0x2c], eax
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x30], eax
push 4
push 0x1000
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
je 0x45b725
push 0
push 0
push 0
push edi
mov dword [ebp - 0x28], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push ebx
push dword [ebp - 0x30]
mov ebx, dword [ebp - 0x28]
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x45b717
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x58]
add ecx, ebx
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x34], ecx
mov edx, dword [ebp - 0x2c]
call fcn.0045b810
mov edx, dword [ebp - 0x28]
movzx ecx, word [eax + edx + 0xe]
movzx esi, word [eax + edx + 0xc]
add esi, ecx
mov edi, edx
je 0x45b6fe
add eax, edi
neg esi
xor ecx, ecx
jmp 0x45b6ba
add ecx, 1
mov edx, esi
add edx, ecx
je 0x45b6fe
mov edx, dword [eax + ecx*8 + 0x10]
test edx, edx
js 0x45b6b1
cmp dx, 0xa
jne 0x45b6b1
mov ebx, 0x7fffffff
and ebx, dword [eax + ecx*8 + 0x14]
movzx edx, word [ebx + eax + 0xe]
movzx ecx, word [ebx + eax + 0xc]
xor esi, esi
add ecx, edx
je 0x45b700
add ebx, eax
add ebx, 0x14
movzx edx, word [ebx - 4]
cmp edx, 0x360
je 0x45b742
add ecx, 0xffffffff
add ebx, 8
test ecx, ecx
jne 0x45b6e6
jmp 0x45b700
xor esi, esi
mov dword [ebp - 0x10], 0xffffffff
push 0x8000
push 0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x45b72c
push 0x8000
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x1c]
mov dword fs:[0], eax
mov eax, esi
add esp, 0x180
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, dword [ebx]
mov edx, ecx
and edx, 0x7fffffff
test ecx, ecx
lea ecx, [edx + eax + 0x14]
cmovns ecx, ebx
mov ecx, dword [ecx]
mov dword [ebp - 0x38], ecx
mov ecx, dword [ebp - 0x34]
mov dword [ecx + 0x58], 0
mov dword [ecx + 0x98], 0
mov dword [ecx + 0x9c], 0
mov dword [ebp - 0x50], 0x18
mov dword [ebp - 0x4c], edi
mov dword [ebp - 0x10], 0
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0x2c], eax
call fcn.0045b810
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x44], eax
mov edx, dword [ebp - 0x38]
mov eax, dword [ecx + edx + 4]
mov dword [ebp - 0x3c], eax
mov edx, dword [ecx + edx]
mov ecx, dword [ebp - 0x34]
call fcn.0045b810
mov ecx, dword [ebp - 0x28]
add ecx, eax
mov dword [ebp - 0x40], ecx
lea eax, [ebp - 0x50]
push eax
call fcn.0045b890
add esp, 4
mov esi, eax
mov edi, dword [ebp - 0x28]
jmp 0x45b700