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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4b2d58
push 0x4a2bd4
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1a0
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
mov dword [ebp - 0x13c], 0
push 0
push 0
push 3
push 0
push 1
push closesocket
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4a4a74
push 0
lea ecx, [ebp - 0x140]
push ecx
push 0x40
lea edx, [ebp - 0x180]
push edx
push ebx
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
call esi
test eax, eax
je 0x4a4a6d
cmp dword [ebp - 0x140], 0x40
jne 0x4a4a6d
cmp word [ebp - 0x180], 0x5a4d
jne 0x4a4a6d
push 0
push 0
mov eax, dword [ebp - 0x144]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, dword [ebp - 0x144]
jne 0x4a4a6d
push 0
lea ecx, [ebp - 0x140]
push ecx
push 0xf8
lea edx, [ebp - 0x11c]
push edx
push ebx
call esi
test eax, eax
je 0x4a4a6d
cmp dword [ebp - 0x140], 0xf8
jne 0x4a4a6d
cmp dword [ebp - 0x11c], 0x4550
jne 0x4a4a6d
cmp word [ebp - 0x116], 0
je 0x4a4a6d
mov eax, dword [ebp - 0x94]
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 0x90]
mov dword [ebp - 0x20], ecx
test eax, eax
je 0x4a4a6d
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x140], eax
push 4
push 0x1000
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
mov dword [ebp - 0x120], edi
test edi, edi
je 0x4a4a6d
push 0
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea edx, [ebp - 0x140]
push edx
mov eax, dword [ebp - 0x140]
push eax
push edi
push ebx
call esi
test eax, eax
jne 0x4a4a87
push 0x8000
push eax
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x144]
lea ebx, [edi + ecx]
mov dword [ebp - 0x190], ebx
mov edx, dword [ebp - 0x24]
push edx
push ebx
push edi
call fcn.004a4c60
add esp, 0xc
add eax, edi
mov dword [ebp - 0x198], eax
lea ecx, [eax + 0x10]
mov dword [ebp - 0x194], ecx
xor edx, edx
mov dx, word [eax + 0xe]
xor esi, esi
mov si, word [eax + 0xc]
add edx, esi
mov dword [ebp - 0x18c], edx
mov esi, edx
dec edx
mov dword [ebp - 0x18c], edx
test esi, esi
je 0x4a4bed
mov esi, dword [ecx]
test esi, 0x80000000
jne 0x4a4c04
cmp si, 0xa
jne 0x4a4c04
mov ecx, dword [ecx + 4]
and ecx, 0x7fffffff
add ecx, eax
mov dword [ebp - 0x19c], ecx
lea edx, [ecx + 0x10]
mov dword [ebp - 0x1a0], edx
xor edx, edx
mov dx, word [ecx + 0xe]
xor esi, esi
mov si, word [ecx + 0xc]
add edx, esi
mov dword [ebp - 0x1a4], edx
mov ecx, dword [ebp - 0x1a0]
mov esi, edx
dec edx
mov dword [ebp - 0x1a4], edx
test esi, esi
je 0x4a4bed
cmp word [ecx], 0x360
jne 0x4a4bf6
mov ecx, dword [ecx + 4]
test ecx, 0x80000000
je 0x4a4b79
and ecx, 0x7fffffff
add ecx, eax
mov dword [ebp - 0x1ac], ecx
add ecx, 0x10
mov dword [ebp - 0x1b0], ecx
mov esi, dword [ecx + 4]
add esi, eax
jmp 0x4a4b7c
lea esi, [ecx + eax]
mov dword [ebp - 0x1a8], esi
xor eax, eax
mov dword [ebx + 0x58], eax
mov dword [ebx + 0x98], eax
mov dword [ebx + 0x9c], eax
mov dword [ebp - 0x138], 0x18
mov dword [ebp - 0x134], edi
mov eax, dword [ebp - 0x24]
push eax
push ebx
push edi
call fcn.004a4c60
mov dword [ebp - 0x130], eax
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x12c], ecx
mov edx, dword [esi + 4]
mov dword [ebp - 0x124], edx
mov eax, dword [esi]
push eax
push ebx
push edi
call fcn.004a4c60
add eax, edi
mov dword [ebp - 0x128], eax
lea ecx, [ebp - 0x138]
push ecx
call fcn.004a4ce0
add esp, 0x1c
mov dword [ebp - 0x13c], eax
mov dword [ebp - 4], 0xffffffff
jmp 0x4a4c28
add ecx, 8
mov dword [ebp - 0x1a0], ecx
jmp 0x4a4b34
add ecx, 8
mov dword [ebp - 0x194], ecx
jmp 0x4a4ad7
test edi, edi
je 0x4a4c3a
push 0x8000
push 0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, dword [ebp - 0x13c]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret