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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
push edi
mov edi, dword [ebp + 8]
push dword [edi + 0x44]
call esi
push dword [edi + 0x18]
mov dword [edi + 0x48], eax
call esi
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push dword [edi + 0x38]
mov dword [edi + 0x1c], eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x1000fd84
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi + 0x24], eax
mov eax, 4
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push 0
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [edi + 0x34], eax
test eax, eax
jne 0x1000fdb3
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, 8
pop esi
mov esp, ebp
pop ebp
ret
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [edi + 0x30], eax
test eax, eax
jne 0x1000fdd5
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, 2
pop esi
mov esp, ebp
pop ebp
ret
push 0
lea ecx, [ebp + 8]
mov dword [ebp + 8], 0
push ecx
push dword [edi + 0x34]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10010001
mov eax, dword [ebp + 8]
cmp eax, dword [edi + 0x34]
jne 0x10010001
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [edi + 0x30]
mov eax, 0x5a4d
cmp word [ebx], ax
jne 0x1000fff5
mov eax, dword [ebx + 0x3c]
cmp dword [eax + ebx], 0x4550
jne 0x1000fff5
mov eax, dword [eax + ebx + 0x98]
test eax, eax
je 0x1000fff5
lea edx, [eax + ebx]
test edx, edx
je 0x1000fff5
add edx, 8
mov dword [edi], edx
je 0x1000fe78
cmp byte [edx], 0x30
jne 0x1000fe71
cmp byte [edx + 1], 0x82
jne 0x1000fe71
movzx ecx, byte [edx + 2]
movzx edx, byte [edx + 3]
shl ecx, 8
add edx, 0x13
add edx, ecx
and edx, 0xffffff8
mov dword [edi + 0x40], edx
jmp 0x1000fe7b
xor edx, edx
mov dword [edi + 0x40], edx
jmp 0x1000fe7b
mov edx, dword [edi + 0x40]
mov dword [edi + 0xc], edx
mov esi, dword [ebx + 0x3c]
mov dword [edi + 0x3c], esi
mov eax, dword [0x1001c218]
lea ecx, [esi + ebx]
mov eax, dword [ecx + eax]
mov dword [edi + 8], eax
test eax, eax
je 0x1000fea7
mov eax, dword [0x1001c218]
lea ecx, [ebx + esi]
mov eax, dword [ecx + eax + 4]
mov dword [edi + 4], eax
jmp 0x1000feaa
mov eax, dword [edi + 4]
mov esi, dword [edi + 0x34]
add edx, 7
mov ecx, esi
and edx, 0xfffffff8
sub ecx, eax
add edx, ecx
mov dword [edi + 0x28], ecx
mov ecx, dword [edi + 0x30]
add edx, ebx
mov ebx, dword [edi + 0x48]
add ebx, edx
mov dword [ebp - 0xc], edx
mov dword [edi + 0x4c], edx
lea eax, [ecx + esi]
mov dword [edi + 0x10], ebx
cmp ebx, eax
jb 0x1000fee9
pop ebx
mov dword [edi + 0x10], 0
mov eax, 8
pop edi
pop esi
mov esp, ebp
pop ebp
ret
sub ecx, dword [edi + 0x1c]
add ecx, esi
mov dword [edi + 0x20], ebx
mov dword [ebp - 8], ecx
cmp ebx, ecx
jae 0x1000ffe9
mov esi, dword [edi + 0x48]
mov ecx, dword [edi + 0x44]
sub esi, 4
jb 0x1000ff18
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x1000ff1d
add ecx, 4
add edx, 4
sub esi, 4
jae 0x1000ff07
cmp esi, 0xfffffffc
je 0x1000ff56
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x1000ff4a
cmp esi, 0xfffffffd
je 0x1000ff56
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x1000ff4a
cmp esi, 0xfffffffe
je 0x1000ff56
mov al, byte [ecx + 2]
cmp al, byte [edx + 2]
jne 0x1000ff4a
cmp esi, 0xffffffff
je 0x1000ff56
mov al, byte [ecx + 3]
cmp al, byte [edx + 3]
je 0x1000ff56
pop ebx
pop edi
mov eax, 0xa
pop esi
mov esp, ebp
pop ebp
ret
mov dword [ebp - 4], ebx
nop dword [eax]
mov esi, dword [edi + 0x1c]
mov edx, ebx
mov ecx, dword [edi + 0x18]
sub esi, 4
jb 0x1000ff81
nop dword [eax]
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x1000ff86
add ecx, 4
add edx, 4
sub esi, 4
jae 0x1000ff70
cmp esi, 0xfffffffc
je 0x1000ffba
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x1000ffb3
cmp esi, 0xfffffffd
je 0x1000ffba
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x1000ffb3
cmp esi, 0xfffffffe
je 0x1000ffba
mov al, byte [ecx + 2]
cmp al, byte [edx + 2]
jne 0x1000ffb3
cmp esi, 0xffffffff
je 0x1000ffba
mov al, byte [ecx + 3]
cmp al, byte [edx + 3]
je 0x1000ffba
sbb eax, eax
or eax, 1
jmp 0x1000ffbc
xor eax, eax
mov ecx, dword [ebp - 4]
test eax, eax
mov eax, dword [ebp - 8]
je 0x1000ffd3
inc ebx
mov dword [edi + 0x20], ebx
mov ecx, ebx
mov dword [ebp - 4], ecx
cmp ebx, eax
jb 0x1000ff60
cmp ecx, eax
jae 0x1000ffe9
sub ecx, dword [ebp - 0xc]
sub ecx, dword [edi + 0x48]
xor eax, eax
pop ebx
mov dword [edi + 0x14], ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
pop ebx
pop edi
mov eax, 0xb
pop esi
mov esp, ebp
pop ebp
ret
pop ebx
pop edi
mov eax, 9
pop esi
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
mov dword [edi + 0x24], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, 6
pop esi
mov esp, ebp
pop ebp
ret