Function at 0x40e480
Capabilities:
Enumerate pe sections
Read file via mapping

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x24
push 0
push pe_nt_image_headers32
push 3
push 0
push 1
push 0x80000000
push dword [esp + 0x50]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
je 0x40e68f
mov esi, eax
push 0
push 0
push 0
push 2
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
or eax, eax
je 0x40e86e
mov edi, eax
push 0
push 0
push 0
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
or eax, eax
je 0x40e872
mov ebx, eax
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], esi
mov edi, dword [eax + 0x3c]
push 4
push 0x3000
push dword [eax + edi + 0x50]
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ebp, eax
push dword [ebx + edi + 0x54]
push ebx
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
cmp word [ebx + edi + 6], 0
mov dword [esp + 0xc], ebx
mov dword [esp], ebp
je 0x40e56c
mov edx, dword [esp + 0xc]
mov eax, dword [edx + 0x3c]
lea esi, [eax + edx]
add esi, 0x10c
xor ebx, ebx
jmp 0x40e534
nop
nop
pushal
popal
nop
nop
nop
pushal
popal
nop
nop
nop
mov eax, dword [esi - 8]
add eax, ebp
mov ecx, dword [esi]
mov ebp, dword [esp + 0xc]
add ecx, ebp
push dword [esi - 4]
push ecx
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
add ebx, 1
movzx eax, word [ebp + edi + 6]
mov ebp, dword [esp]
add esi, 0x28
cmp ebx, eax
jb 0x40e540
mov ebx, dword [ebp + 0x3c]
mov ecx, dword [ebp + ebx + 0x34]
mov eax, dword [ebp + ebx + 0xa4]
mov edx, dword [esp + 0x40]
mov dword [ebp + ebx + 0x34], edx
test eax, eax
je 0x40e696
jle 0x40e696
mov esi, dword [ebp + ebx + 0xa0]
lea edx, [esi + ebp]
push ecx
pop edi
shr edi, 0x10
mov dword [esp + 4], edi
mov edi, dword [esp + 0x40]
shr edi, 0x10
mov dword [esp + 0x10], edi
mov dword [esp + 8], ebx
jmp 0x40e5ea
mov edi, dword [edx + 4]
mov eax, dword [esp]
mov ebx, dword [esp + 8]
mov esi, dword [eax + ebx + 0xa0]
mov eax, dword [eax + ebx + 0xa4]
add edx, edi
mov ebp, dword [esp]
lea edi, [esi + ebp]
add edi, eax
cmp edx, edi
jae 0x40e696
mov edi, dword [edx + 4]
or edi, edi
je 0x40e696
lea ebp, [edi - 8]
cmp ebp, 2
jb 0x40e5d8
mov eax, dword [edx]
add eax, dword [esp]
shr ebp, 1
sub esi, esi
jmp 0x40e634
and ebx, 0xfff
sub word [ebx + eax], cx
movzx edi, word [edx + esi*2 + 8]
and edi, 0xfff
mov ebx, dword [esp + 0x40]
add word [edi + eax], bx
add esi, 1
cmp ebp, esi
je 0x40e5c0
movzx ebx, word [edx + esi*2 + 8]
mov edi, ebx
shr edi, 0xc
add edi, 0xffffffff
cmp di, 9
ja case.0x40e64a.3
movzx edi, di
jmp dword [edi*4 + 0x411004]
and ebx, 0xfff
sub dword [ebx + eax], ecx
movzx edi, word [edx + esi*2 + 8]
and edi, 0xfff
mov ebx, dword [esp + 0x40]
add dword [edi + eax], ebx
jmp case.0x40e64a.3
and ebx, 0xfff
mov edi, dword [esp + 4]
sub word [ebx + eax], di
movzx edi, word [edx + esi*2 + 8]
and edi, 0xfff
mov ebx, dword [esp + 0x10]
jmp 0x40e629
xor ebp, ebp
jmp 0x40e882
cmp dword [ebp + ebx + 0x84], 0
je 0x40e85a
mov eax, dword [ebp + ebx + 0x80]
cmp dword [ebp + eax], 0
je 0x40e85a
add eax, ebp
push ebp
pop ecx
add ecx, 2
mov dword [esp + 0x10], ecx
jmp 0x40e6f0
push dword [esp + 4]
call sub.msvcrt.dll_free
add esp, 4
mov eax, dword [esp + 8]
cmp dword [eax + 0x14], 0
lea eax, [eax + 0x14]
mov ebp, dword [esp]
je 0x40e85a
mov dword [esp + 8], eax
mov edi, dword [eax + 0xc]
add edi, ebp
push 0x104
push edi
call fcn.0040fb10
add esp, 8
push eax
pop esi
lea ebx, [eax + 1]
push 2
push ebx
call sub.msvcrt.dll_calloc
add esp, 8
test eax, eax
je 0x40e6dc
mov ebp, eax
push esi
push edi
push ebx
push eax
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.msvcrt.dll_mbstowcs_s]
add esp, 0x14
push 4
push 0x41102c
push ebp
mov ebx, dword [sym.imp.msvcrt.dll__wcsnicmp]
call ebx
add esp, 0xc
or eax, eax
je 0x40e757
push 4
push str.ext_
push ebp
call ebx
add esp, 0xc
test eax, eax
jne 0x40e7a7
lea eax, [esp + 0x1c]
push eax
push ebp
push dword [esp + 0x44]
call fcn.0040dee0
add esp, 0xc
test eax, eax
je 0x40e7a7
mov esi, eax
push ebp
call sub.msvcrt.dll_free
add esp, 4
mov edi, dword [esp + 0x1c]
lea eax, [edi + 1]
push 2
push eax
call sub.msvcrt.dll_calloc
add esp, 8
test eax, eax
je 0x40e6dc
mov ebp, eax
add edi, edi
push edi
push esi
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov ebx, dword [sym.imp.msvcrt.dll__wcsnicmp]
call fcn.0040ded0
push eax
pop esi
mov edi, eax
mov dword [esp + 4], ebp
jmp 0x40e7c6
mov edi, dword [edi]
cmp edi, esi
je 0x40e7f0
cmp word [edi + 0x1c], 3
jb 0x40e7c0
movzx eax, word [edi + 0x24]
shr eax, 1
push eax
push dword [edi + 0x28]
push ebp
call ebx
add esp, 0xc
or eax, eax
jne 0x40e7c0
mov esi, dword [edi + 0x10]
or esi, esi
jne 0x40e801
jmp 0x40e6d0
push ebp
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov esi, eax
or esi, esi
je 0x40e6d0
mov eax, dword [esp + 8]
mov ebx, dword [eax]
mov ebp, dword [eax + 0x10]
or ebx, ebx
cmove ebx, ebp
mov eax, dword [esp]
mov eax, dword [eax + ebx]
or eax, eax
je 0x40e6d0
mov edi, dword [esp]
jmp 0x40e851
add eax, dword [esp + 0x10]
push dword [esp + 4]
push eax
push esi
call fcn.0040e9f0
mov dword [edi + ebp], eax
mov eax, dword [edi + ebx + 4]
add edi, 4
or eax, eax
je 0x40e6d0
or eax, eax
jns 0x40e830
movzx eax, ax
jmp 0x40e834
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x14]
jmp 0x40e874
xor ebp, ebp
jmp 0x40e87b
xor ebp, ebp
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebp
pop eax
add esp, 0x24
pop esi
pop edi
pop ebx
pop ebp
ret