Function at 0x41403e
Capabilities:
Enumerate pe sections
Get file size
Parse pe header
Read file via mapping

Disassembly:
mov eax, 0x467185
call fcn.00464890
sub esp, 0x38
push ebx
push esi
mov dword [ebp - 0x20], ecx
xor ebx, ebx
mov dword [ebp - 4], ebx
mov esi, edx
push edi
mov dword [ebp - 0x30], ebx
call fcn.0043e220
push ebx
mov edx, 0x8000
mov ecx, esi
mov eax, dword [eax]
mov dword [ebp - 0x34], eax
call fcn.004183f5
pop ecx
mov ecx, eax
mov edx, ebx
shr eax, 0x1f
xor al, 1
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x24], edx
je 0x4140a8
push ebx
push ebx
push ebx
push 2
push ebx
push ecx
call fcn.0044caca
pop ecx
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileMappingA]
mov edx, eax
test edx, edx
mov dword [ebp - 0x24], edx
setne al
mov dword [ebp - 0x10], eax
mov esi, ebx
mov dword [ebp - 0x1c], esi
test al, al
je 0x4140ca
push ebx
push ebx
push ebx
push 4
push edx
call dword [sym.imp.KERNEL32.DLL_MapViewOfFile]
mov esi, eax
mov dword [ebp - 0x1c], eax
test esi, esi
setne al
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x18], ebx
test al, al
je 0x4140e2
mov eax, 0x5a4d
mov dword [ebp - 0x18], esi
cmp word [esi], ax
sete al
mov dword [ebp - 0x10], eax
mov edi, ebx
test al, al
je 0x41411f
push ebx
push dword [ebp - 0x28]
call fcn.0044caca
pop ecx
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileSize]
cmp eax, 0x3c
jbe 0x4141b8
mov ecx, dword [ebp - 0x18]
mov ecx, dword [ecx + 0x3c]
cmp eax, ecx
jbe 0x4141b8
lea edi, [ecx + esi]
cmp dword [edi], 0x4550
sete al
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], ebx
test al, al
je 0x414182
movzx eax, word [edi + 6]
mov edx, 0x80
mov dword [ebp - 0x2c], eax
movzx eax, word [edi + 0x14]
mov dword [ebp - 0x18], 0xe0
cmp ax, word [ebp - 0x18]
lea ecx, [edx + 0x10]
cmovne edx, ecx
lea ecx, [edi + 0x18]
add edx, edi
add ecx, eax
mov edi, dword [ebp - 0x2c]
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x14], ecx
test edi, edi
je 0x41417c
mov edx, dword [edx]
cmp dword [ecx + 0xc], edx
ja 0x41416f
mov eax, dword [ecx + 8]
add eax, dword [ecx + 0xc]
cmp edx, eax
jb 0x414177
add ecx, 0x28
sub edi, 1
jne 0x414160
mov dword [ebp - 0x14], ecx
test edi, edi
setne al
mov byte [ebp - 0x10], al
mov edi, ebx
mov dword [ebp - 0x38], 7
push 0x1c
mov dword [ebp - 0x3c], edi
call fcn.0043016b
pop ecx
mov dword [ebp - 0x40], eax
cmp byte [ebp - 0x10], 0
mov dword [ebp - 4], 1
je 0x414207
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x18]
mov ecx, dword [eax + 0x14]
sub ecx, dword [eax + 0xc]
add ecx, dword [edx]
add ecx, esi
jmp 0x414200
mov byte [ebp - 0x10], bl
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], ebx
jmp 0x414182
mov edx, dword [ecx + 0xc]
sub edx, dword [eax + 0xc]
add edx, dword [eax + 0x14]
add edx, esi
mov dword [ebp - 0x2c], edx
cmp edi, dword [ebp - 0x38]
jb 0x4141f0
mov eax, dword [ebp - 0x38]
lea ecx, [ebp - 0x40]
add eax, eax
push eax
call fcn.00408aa7
mov edi, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x2c]
mov esi, dword [ebp - 0x40]
mov dword [esi + edi*4], edx
inc edi
mov esi, dword [ebp - 0x1c]
add ecx, 0x14
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x18], ecx
cmp dword [ecx], ebx
jne 0x4141c3
mov ecx, dword [ebp - 0x20]
push edi
call fcn.00414779
mov dword [ebp - 0x30], 1
test edi, edi
je 0x414240
mov esi, ebx
push ebx
lea ecx, [ebp - 0x40]
call fcn.004089a8
push dword [eax]
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 8]
add ecx, esi
call fcn.004160df
inc ebx
add esi, 0x10
cmp ebx, edi
jb 0x41421d
mov esi, dword [ebp - 0x1c]
test esi, esi
je 0x41424b
push esi
call dword [sym.imp.KERNEL32.DLL_UnmapViewOfFile]
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x414259
push eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov eax, dword [ebp - 0x28]
test eax, eax
js 0x414267
push eax
call fcn.00450118
pop ecx
call fcn.0043e220
mov ecx, dword [ebp - 0x34]
push dword [ebp - 0x40]
mov dword [eax], ecx
call fcn.00430166
mov eax, dword [ebp - 0x20]
pop ecx
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret