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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x23c
push ebx
push esi
push edi
xor edi, edi
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov esi, eax
cmp esi, edi
je 0x402c19
mov eax, 0x5a4d
cmp word [esi], ax
jne 0x402c19
call fcn.004031fc
mov dword [0x4061b0], eax
call fcn.0040124c
mov dword [0x4061ac], eax
mov eax, dword [esi + 0x3c]
add eax, esi
cmp dword [eax], 0x4550
jne 0x402c19
mov esi, dword [eax + 0x98]
push 0x104
lea eax, [ebp - 0x23c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push edi
push 0x80
push 3
push edi
push 1
push SysReAllocString
lea eax, [ebp - 0x23c]
push eax
mov ebx, esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 4], eax
cmp eax, 0xffffffff
je 0x402c19
cmp esi, edi
jne 0x402bc8
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
push edi
push edi
sub ebx, 0x24
push ebx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push edi
lea eax, [ebp - 0x10]
push eax
push 0x24
lea eax, [ebp - 0x34]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0x20
pop eax
lea ecx, [ebp + eax - 0x34]
cmp byte [ecx], 0x54
jne 0x402bff
cmp dword [ecx], 0xefab5354
je 0x402c04
dec eax
jns 0x402bee
jmp 0x402c10
lea esi, [ebp + eax - 0x44]
lea ebx, [ebx + eax - 0x10]
cmp esi, edi
jne 0x402c20
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
sub ebx, dword [esi + 8]
push dword [esi + 4]
mov eax, ebx
sub eax, dword [esi + 0xc]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [0x406188], eax
call edi
mov dword [ebp - 8], eax
mov eax, dword [ebp - 4]
push 0x10000
push 0
mov dword [0x406200], eax
call edi
mov dword [0x406204], eax
mov eax, dword [esi + 4]
mov ecx, dword [esi + 8]
push eax
push dword [ebp - 8]
push ecx
push ebx
call fcn.004012c2
mov ebx, dword [ebp - 8]
add esp, 0x10
xor edx, edx
mov ecx, ebx
test eax, eax
je 0x402c7f
movzx ebx, byte [ecx]
dec eax
add edx, ebx
inc ecx
test eax, eax
jne 0x402c71
mov ebx, dword [ebp - 8]
cmp edx, dword [esi]
jne 0x402c19
mov eax, dword [ebx]
imul eax, eax, 0x1c
lea esi, [eax + ebx + 0xc]
movzx eax, byte [ebx + 8]
imul eax, eax, 0x62
push eax
push 0
call edi
movzx ecx, byte [ebx + 8]
and dword [ebp - 4], 0
mov dword [0x40618c], eax
test ecx, ecx
jbe 0x402d0c
lea ecx, [eax + 6]
mov ax, word [esi]
inc esi
inc esi
mov word [ecx - 6], ax
mov eax, esi
mov dword [ecx - 4], esi
lea edx, [eax + 2]
mov di, word [eax]
inc eax
inc eax
test di, di
jne 0x402cbd
sub eax, edx
sar eax, 1
lea esi, [esi + eax*2 + 2]
mov edx, ecx
mov dword [ebp - 8], 0x17
mov eax, esi
lea edi, [eax + 2]
mov dword [edx], esi
mov dword [ebp - 0xc], edi
mov di, word [eax]
inc eax
inc eax
test di, di
jne 0x402ce2
sub eax, dword [ebp - 0xc]
add edx, 4
sar eax, 1
dec dword [ebp - 8]
lea esi, [esi + eax*2 + 2]
jne 0x402cd8
movzx eax, byte [ebx + 8]
inc dword [ebp - 4]
add ecx, 0x62
cmp dword [ebp - 4], eax
jb 0x402cac
test byte [0x4061b0], 6
je 0x402d30
mov al, byte [ebx + 0xa]
and al, 1
movzx eax, al
neg eax
sbb eax, eax
and eax, 0xffffff00
add eax, 0x200
mov dword [0x4061a0], eax
xor ecx, ecx
movzx eax, word [esi]
neg eax
sbb eax, eax
and eax, esi
mov dword [ecx + 0x4061c0], eax
mov eax, esi
lea edi, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x402d46
sub eax, edi
sar eax, 1
add ecx, 4
lea esi, [esi + eax*2 + 2]
cmp ecx, 0x30
jb 0x402d32
cmp dword [0x4061c8], 0
mov dword [0x40619c], esi
jne 0x402dd2
mov eax, dword [0x4061c0]
lea edx, [ebp - 0x23c]
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
inc eax
inc eax
test cx, cx
jne 0x402d7c
mov eax, str..exe
mov edx, eax
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x402d91
sub eax, edx
lea edi, [ebp - 0x23c]
dec edi
dec edi
mov cx, word [edi + 2]
inc edi
inc edi
test cx, cx
jne 0x402da5
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [ebp - 0x23c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.00403cee
pop ecx
mov dword [0x4061c8], eax
and dword [ebp - 4], 0
cmp dword [ebx], 0
jbe 0x402e3e
lea eax, [ebx + 0x14]
mov edi, 0xffff0
mov ecx, dword [eax]
test cl, 0xf
jne 0x402def
or ecx, 0xf
mov dword [eax], ecx
mov ecx, dword [eax]
test edi, ecx
jne 0x402df9
or ecx, edi
mov dword [eax], ecx
mov esi, dword [eax]
mov ecx, esi
shr ecx, 4
and ecx, dword [0x4061ac]
test ecx, 0xffff
je 0x402e31
mov ecx, esi
and ecx, dword [0x4061b0]
test cl, 0xf
je 0x402e31
inc dword [0x406184]
mov ecx, dword [eax + 8]
add dword [0x406190], ecx
adc dword [0x406194], 0
inc dword [ebp - 4]
mov ecx, dword [ebp - 4]
add eax, 0x1c
cmp ecx, dword [ebx]
jb 0x402de3
mov eax, dword [0x406190]
or eax, dword [0x406194]
jne 0x402e5b
and dword [0x406194], eax
mov dword [0x406190], 1
mov eax, ebx
jmp 0x402c1b