Function at 0x4093d4
Capabilities:
Enumerate pe sections
Get system information on windows
Parse pe header

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x7c
mov ebp, dword [esp + 0xac]
cmp dword [esp + 0x94], 0x3f
jbe 0x409428
mov eax, dword [esp + 0x90]
cmp word [eax], 0x5a4d
je 0x40940f
mov dword [esp], 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
push eax
xor ebx, ebx
jmp 0x409b1e
mov eax, dword [esp + 0x90]
mov esi, dword [eax + 0x3c]
lea eax, [esi + 0xf8]
cmp dword [esp + 0x94], eax
jae 0x409431
mov dword [esp], 0xd
jmp 0x409401
add esi, dword [esp + 0x90]
cmp dword [esi], 0x4550
jne 0x4093fa
cmp word [esi + 4], 0x14c
jne 0x4093fa
mov eax, dword [esi + 0x38]
mov dword [esp + 0x24], eax
test al, 1
jne 0x4093fa
movzx eax, word [esi + 0x14]
lea eax, [esi + eax + 0x18]
movzx edi, word [esi + 6]
mov dword [esp + 0x28], edi
xor edi, edi
xor edx, edx
cmp edx, dword [esp + 0x28]
jae 0x40948c
mov ebx, dword [eax + 0xc]
mov ecx, dword [eax + 0x10]
add ecx, ebx
cmp dword [eax + 0x10], 0
jne 0x409481
mov ecx, dword [esp + 0x24]
add ecx, ebx
cmp edi, ecx
cmovb edi, ecx
inc edx
add eax, 0x28
jmp 0x409467
lea eax, [esp + 0x4c]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
push eax
mov eax, dword [esp + 0x50]
lea edx, [eax - 1]
neg eax
mov ebx, dword [esi + 0x50]
add ebx, edx
and ebx, eax
add edx, edi
and eax, edx
cmp ebx, eax
jne 0x4093fa
mov dword [esp + 0x10], ebp
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0x3000
mov dword [esp + 4], ebx
mov eax, dword [esi + 0x34]
mov dword [esp], eax
call dword [esp + 0x98]
mov dword [esp + 0x24], eax
test eax, eax
jne 0x40951d
mov dword [esp + 0x10], ebp
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0x3000
mov dword [esp + 4], ebx
mov dword [esp], 0
call dword [esp + 0x98]
mov dword [esp + 0x24], eax
test eax, eax
jne 0x40951d
mov dword [esp], 0xe
jmp 0x409401
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov dword [esp + 8], 0x40
mov dword [esp + 4], 8
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
sub esp, 0xc
mov ebx, eax
test eax, eax
jne 0x409579
mov dword [esp + 0xc], ebp
mov dword [esp + 8], 0x8000
mov dword [esp + 4], 0
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call dword [esp + 0x9c]
mov dword [esp], 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x40980b
mov eax, dword [esp + 0x24]
mov dword [ebx + 4], eax
mov ax, word [esi + 0x16]
shr ax, 0xd
and eax, 1
mov dword [ebx + 0x14], eax
mov eax, dword [esp + 0x98]
mov dword [ebx + 0x1c], eax
mov eax, dword [esp + 0x9c]
mov dword [ebx + 0x20], eax
mov eax, dword [esp + 0xa0]
mov dword [ebx + 0x24], eax
mov eax, dword [esp + 0xa4]
mov dword [ebx + 0x28], eax
mov eax, dword [esp + 0xa8]
mov dword [ebx + 0x2c], eax
mov dword [ebx + 0x34], ebp
mov eax, dword [esp + 0x50]
mov dword [ebx + 0x3c], eax
mov eax, dword [esi + 0x54]
cmp dword [esp + 0x94], eax
jae 0x4095e2
mov dword [esp], 0xd
jmp 0x4097c8
mov dword [esp + 0x10], ebp
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0x1000
mov dword [esp + 4], eax
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call dword [esp + 0x98]
mov edi, eax
mov eax, dword [esi + 0x54]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x90]
mov dword [esp + 4], eax
mov dword [esp], edi
call sub.msvcrt.dll_memcpy
mov edx, dword [esp + 0x90]
mov eax, dword [edx + 0x3c]
add eax, edi
mov dword [ebx], eax
mov edi, dword [esp + 0x24]
mov dword [eax + 0x34], edi
mov edi, dword [ebx + 4]
movzx edx, word [eax + 0x14]
lea ebp, [eax + edx + 0x18]
mov dword [esp + 0x28], 0
mov eax, dword [ebx]
movzx ecx, word [eax + 6]
cmp dword [esp + 0x28], ecx
jge 0x40988e
mov eax, dword [ebp + 0x10]
test eax, eax
jne 0x4096c2
mov ecx, dword [esi + 0x38]
test ecx, ecx
jle 0x40972f
mov eax, dword [ebx + 0x34]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0x1000
mov dword [esp + 4], ecx
mov dword [esp + 0x2c], ecx
mov eax, dword [ebp + 0xc]
add eax, edi
mov dword [esp], eax
call dword [ebx + 0x1c]
test eax, eax
je 0x409881
mov eax, dword [ebp + 0xc]
add eax, edi
mov dword [ebp + 8], eax
mov ecx, dword [esp + 0x2c]
mov dword [esp + 8], ecx
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.msvcrt.dll_memset
jmp 0x40972f
mov ecx, dword [ebp + 0x14]
add ecx, eax
cmp dword [esp + 0x94], ecx
jb 0x4095d6
mov ecx, dword [ebx + 0x34]
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0x1000
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
add eax, edi
mov dword [esp], eax
call dword [ebx + 0x1c]
test eax, eax
je 0x409881
mov ecx, dword [ebp + 0xc]
add ecx, edi
mov eax, dword [ebp + 0x10]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x90]
add eax, dword [ebp + 0x14]
mov dword [esp + 4], eax
mov dword [esp], ecx
mov dword [esp + 0x2c], ecx
call sub.msvcrt.dll_memcpy
mov ecx, dword [esp + 0x2c]
mov dword [ebp + 8], ecx
inc dword [esp + 0x28]
add ebp, 0x28
jmp 0x40964c
mov edx, 1
mov dword [ebx + 0x18], edx
mov dword [esp + 0x30], 0
mov dword [esp + 0x34], 0
lea ecx, [esp + 0x34]
lea edx, [esp + 0x30]
mov eax, ebx
call fcn.004040fc
test eax, eax
jne 0x409881
mov eax, dword [ebx]
cmp dword [eax + 0x84], 0
je 0x409811
mov edi, dword [ebx + 4]
mov dword [esp + 0x28], edi
mov esi, dword [eax + 0x80]
add esi, edi
mov dword [esp + 4], 0x14
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
push ecx
push ecx
test eax, eax
jne 0x409811
mov eax, dword [esi + 0xc]
test eax, eax
je 0x409811
mov edx, dword [ebx + 0x34]
mov dword [esp + 4], edx
add eax, dword [esp + 0x28]
mov dword [esp], eax
call dword [ebx + 0x24]
mov edi, eax
test eax, eax
jne 0x409908
mov dword [esp], 0x7e
call dword [sym.imp.KERNEL32.dll_SetLastError]
push esi
jmp 0x409881
mov dword [ebx + 0x10], 1
mov esi, dword [esp + 0x30]
test esi, esi
je 0x409b1e
mov eax, dword [esp + 0x34]
test eax, eax
je 0x409802
mov dword [esp + 4], eax
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_DeactivateActCtx]
push edx
push edx
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_ReleaseActCtx]
push eax
jmp 0x409b1e
mov edx, dword [ebx]
movzx eax, word [edx + 0x14]
lea esi, [edx + eax + 0x18]
mov ecx, dword [esi + 8]
mov dword [esp + 0x38], ecx
mov eax, dword [ebx + 0x3c]
neg eax
and eax, ecx
mov dword [esp + 0x3c], eax
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 0x24]
test eax, eax
je 0x4099ae
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], ecx
mov dword [esp + 0x48], 0
add esi, 0x28
mov dword [esp + 0x2c], 1
mov eax, dword [ebx]
movzx edx, word [eax + 6]
cmp dword [esp + 0x2c], edx
jl 0x4099cc
mov dword [esp + 0x48], 1
lea edx, [esp + 0x38]
mov eax, ebx
call fcn.0040603c
test eax, eax
jne 0x409a70
mov dword [esp], ebx
call fcn.0040919c
jmp 0x409408
mov edx, dword [eax + 0x34]
sub edx, dword [esi + 0x34]
mov dword [esp + 0x2c], edx
je 0x4098fc
xor edx, edx
cmp dword [eax + 0xa4], 0
je 0x409740
mov ecx, dword [ebx + 4]
mov edx, dword [eax + 0xa0]
add edx, ecx
mov eax, dword [edx]
mov dword [esp + 0x28], eax
test eax, eax
je 0x40973b
lea edi, [edx + 8]
xor esi, esi
mov ebp, dword [edx + 4]
lea eax, [ebp - 8]
shr eax, 1
cmp esi, eax
jae 0x4098f8
mov ax, word [edi]
mov ebp, eax
shr bp, 0xc
cmp bp, 3
jne 0x4098f2
and eax, 0xfff
add eax, dword [esp + 0x28]
mov ebp, dword [esp + 0x2c]
add dword [ecx + eax], ebp
inc esi
add edi, 2
jmp 0x4098c7
add edx, ebp
jmp 0x4098b4
mov dword [ebx + 0x18], 1
jmp 0x409743
mov eax, dword [ebx + 0xc]
lea eax, [eax*4 + 4]
mov dword [esp + 4], eax
mov eax, dword [ebx + 8]
mov dword [esp], eax
call sub.msvcrt.dll_realloc
test eax, eax
jne 0x40993e
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], eax
mov dword [esp], edi
call dword [ebx + 0x2c]
mov dword [esp], 0xe
jmp 0x4097c8
mov dword [ebx + 8], eax
mov edx, dword [ebx + 0xc]
lea ecx, [edx + 1]
mov dword [ebx + 0xc], ecx
mov dword [eax + edx*4], edi
mov eax, dword [esi]
mov ebp, dword [esp + 0x28]
add ebp, dword [esi + 0x10]
mov dword [esp + 0x2c], ebp
test eax, eax
je 0x409995
add eax, dword [esp + 0x28]
mov dword [esp + 0x2c], eax
jmp 0x409995
mov edx, dword [ebx + 0x28]
mov ecx, dword [ebx + 0x34]
mov dword [esp + 8], ecx
jns 0x4099a4
movzx eax, ax
mov dword [esp + 4], eax
mov dword [esp], edi
call edx
mov dword [ebp], eax
cmp dword [ebp], 0
je 0x409afd
add dword [esp + 0x2c], 4
add ebp, 4
mov eax, dword [esp + 0x2c]
mov eax, dword [eax]
test eax, eax
jne 0x409968
jmp 0x409b16
mov ecx, dword [esp + 0x28]
lea eax, [ecx + eax + 2]
jmp 0x409977
test cl, 0x40
je 0x4099bb
mov eax, dword [edx + 0x20]
jmp 0x40983b
test cl, 0x80
je 0x40983b
mov eax, dword [edx + 0x24]
jmp 0x40983b
mov edi, dword [esi + 8]
mov dword [esp + 0x28], edi
mov edi, dword [ebx + 0x3c]
neg edi
and edi, dword [esp + 0x28]
mov ebp, dword [esi + 0x10]
test ebp, ebp
jne 0x4099f8
mov edx, dword [esi + 0x24]
test dl, 0x40
je 0x4099f0
mov ebp, dword [eax + 0x20]
jmp 0x4099f8
and dl, 0x80
je 0x4099f8
mov ebp, dword [eax + 0x24]
mov edx, dword [esp + 0x38]
cmp edi, dword [esp + 0x3c]
je 0x409a0c
mov eax, dword [esp + 0x40]
add eax, edx
cmp edi, eax
jae 0x409a3a
mov edi, dword [esi + 0x24]
mov ecx, dword [esp + 0x44]
mov eax, edi
or eax, ecx
bt edi, 0x19
jae 0x409a23
bt ecx, 0x19
jb 0x409a28
and eax, 0xfdffffff
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x28]
sub eax, edx
add ebp, eax
mov dword [esp + 0x40], ebp
jmp 0x409a64
lea edx, [esp + 0x38]
mov eax, ebx
call fcn.0040603c
test eax, eax
je 0x409881
mov eax, dword [esp + 0x28]
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], edi
mov dword [esp + 0x40], ebp
mov eax, dword [esi + 0x24]
mov dword [esp + 0x44], eax
inc dword [esp + 0x2c]
add esi, 0x28
jmp 0x409856
mov eax, dword [ebx]
mov eax, dword [eax + 0xc0]
test eax, eax
jne 0x409a87
mov eax, dword [ebx]
mov eax, dword [eax + 0x28]
test eax, eax
jne 0x409ab5
jmp 0x409af4
mov edi, dword [ebx + 4]
mov esi, dword [edi + eax + 0xc]
test esi, esi
je 0x409a7c
mov eax, dword [esi]
test eax, eax
je 0x409a7c
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], edi
call eax
sub esp, 0xc
add esi, 4
jmp 0x409a92
add eax, dword [esp + 0x24]
cmp dword [ebx + 0x14], 0
je 0x409aef
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov esi, dword [esp + 0x24]
mov dword [esp], esi
call eax
sub esp, 0xc
test eax, eax
jne 0x4097d4
mov dword [esp], 0x45a
jmp 0x4097c8
mov dword [ebx + 0x38], eax
jmp 0x409b1e
mov dword [ebx + 0x38], 0
jmp 0x409b1e
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], eax
mov dword [esp], edi
call dword [ebx + 0x2c]
mov dword [esp], 0x7f
jmp 0x4097c8
add esi, 0x14
jmp 0x409788
mov eax, ebx
add esp, 0x7c
pop ebx
pop esi
pop edi
pop ebp
ret