Function at 0x40e460
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 0x40e66f
mov esi, eax
push 0
push 0
push 0
push 2
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
test eax, eax
je 0x40e84e
push eax
pop edi
push 0
push 0
push 0
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
test eax, eax
je 0x40e852
push eax
pop ebx
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]
push eax
pop ebp
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 0x40e54c
mov edx, dword [esp + 0xc]
mov eax, dword [edx + 0x3c]
lea esi, [eax + edx]
add esi, 0x10c
sub ebx, ebx
nop
jmp 0x40e515
jmp 0x40e518
jmp 0x40e51b
nop
nop
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 0x40e520
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
or eax, eax
je 0x40e676
jle 0x40e676
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 0x40e5ca
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 0x40e676
mov edi, dword [edx + 4]
or edi, edi
je 0x40e676
lea ebp, [edi - 8]
cmp ebp, 2
jb 0x40e5b8
mov eax, dword [edx]
add eax, dword [esp]
shr ebp, 1
xor esi, esi
jmp 0x40e614
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 0x40e5a0
movzx ebx, word [edx + esi*2 + 8]
mov edi, ebx
shr edi, 0xc
add edi, 0xffffffff
cmp di, 9
ja case.0x40e62a.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.0x40e62a.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 0x40e609
sub ebp, ebp
jmp 0x40e862
cmp dword [ebp + ebx + 0x84], 0
je 0x40e83a
mov eax, dword [ebp + ebx + 0x80]
cmp dword [ebp + eax], 0
je 0x40e83a
add eax, ebp
mov ecx, ebp
add ecx, 2
mov dword [esp + 0x10], ecx
jmp 0x40e6d0
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 0x40e83a
mov dword [esp + 8], eax
mov edi, dword [eax + 0xc]
add edi, ebp
push 0x104
push edi
call fcn.0040faf0
add esp, 8
mov esi, eax
lea ebx, [eax + 1]
push 2
push ebx
call sub.msvcrt.dll_calloc
add esp, 8
or eax, eax
je 0x40e6bc
push eax
pop ebp
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
test eax, eax
je 0x40e737
push 4
push str.ext_
push ebp
call ebx
add esp, 0xc
test eax, eax
jne 0x40e787
lea eax, [esp + 0x1c]
push eax
push ebp
push dword [esp + 0x44]
call fcn.0040dec0
add esp, 0xc
test eax, eax
je 0x40e787
push eax
pop esi
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 0x40e6bc
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.0040deb0
push eax
pop esi
push eax
pop edi
mov dword [esp + 4], ebp
jmp 0x40e7a6
mov edi, dword [edi]
cmp edi, esi
je 0x40e7d0
cmp word [edi + 0x1c], 3
jb 0x40e7a0
movzx eax, word [edi + 0x24]
shr eax, 1
push eax
push dword [edi + 0x28]
push ebp
call ebx
add esp, 0xc
test eax, eax
jne 0x40e7a0
mov esi, dword [edi + 0x10]
test esi, esi
jne 0x40e7e1
jmp 0x40e6b0
push ebp
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push eax
pop esi
test esi, esi
je 0x40e6b0
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 0x40e6b0
mov edi, dword [esp]
jmp 0x40e831
add eax, dword [esp + 0x10]
push dword [esp + 4]
push eax
push esi
call fcn.0040e9d0
mov dword [edi + ebp], eax
mov eax, dword [edi + ebx + 4]
add edi, 4
or eax, eax
je 0x40e6b0
or eax, eax
jns 0x40e810
movzx eax, ax
jmp 0x40e814
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x14]
jmp 0x40e854
xor ebp, ebp
jmp 0x40e85b
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