Function at 0x404077
Capabilities:
Allocate or change rwx memory
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x438
and dword [ebp - 0x14], 0
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebx + 0x3c]
add esi, ebx
cmp dword [esi], 0x4550
push edi
je 0x4040bf
movzx eax, byte [ebx + 0xa]
and eax, 0x11
cmp ax, 0x111
je 0x4040bf
mov esi, 0x405018
push 0x4010d0
mov eax, esi
call fcn.004049ed
push 0x401338
jmp 0x4042e5
push 0x40
push 0x1000
push dword [esi + 0x50]
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test edi, edi
mov dword [ebp - 8], edi
jne 0x40411e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push 0x401348
lea eax, [ebp - 0x434]
call fcn.00404a08
push 0xa
mov eax, esi
lea ecx, [ebp - 0x434]
call fcn.00404950
mov esi, 0x405018
push 0x4010d0
mov eax, esi
call fcn.004049ed
lea eax, [ebp - 0x434]
push eax
jmp 0x4042e5
mov edx, dword [esi + 0x54]
push ebx
call fcn.00404a57
movzx eax, word [esi + 0x14]
pop ecx
movzx ecx, word [esi + 6]
test ecx, ecx
lea eax, [eax + esi + 0x18]
jbe 0x40416e
lea ebx, [eax + 0xc]
lea edi, [eax + 0x14]
lea esi, [eax + 0x10]
mov dword [ebp - 0xc], ecx
mov eax, dword [edi]
test eax, eax
je 0x40415d
mov ecx, dword [ebp + 8]
mov edx, dword [esi]
add eax, ecx
push eax
mov eax, dword [ebx]
add eax, dword [ebp - 8]
call fcn.00404a57
pop ecx
add esi, 0x28
add edi, 0x28
add ebx, 0x28
dec dword [ebp - 0xc]
jne 0x404144
mov edi, dword [ebp - 8]
mov esi, dword [edi + 0x3c]
add esi, edi
call fcn.00403fbc
sub eax, dword [0x405014]
cmp eax, 0xfff
jbe 0x40418c
xor eax, eax
jmp 0x40421b
mov ecx, dword [esi + 0xa4]
test ecx, ecx
mov dword [ebp - 0x10], ecx
je 0x4041fe
mov eax, dword [esi + 0xa0]
mov edx, edi
sub edx, dword [esi + 0x34]
add eax, edi
test ecx, ecx
jbe 0x4041fe
mov ebx, dword [eax + 4]
sub ebx, 8
mov dword [ebp - 0xc], ebx
mov ebx, dword [eax]
mov dword [ebp - 0x18], ebx
lea ebx, [eax + 8]
mov dword [ebp + 8], ebx
je 0x4041f3
mov ecx, dword [ebp + 8]
movzx ecx, word [ecx]
movzx ecx, cx
mov ebx, ecx
shr ebx, 0xc
je 0x4041e2
cmp ebx, 3
jne 0x404220
and ecx, 0xfff
add ecx, dword [ebp - 0x18]
add ecx, edi
add dword [ecx], edx
sub dword [ebp - 0xc], 2
add dword [ebp + 8], 2
cmp dword [ebp - 0xc], 0
ja 0x4041c0
mov ecx, dword [ebp - 0x10]
sub ecx, dword [eax + 4]
mov eax, dword [ebp + 8]
mov dword [ebp - 0x10], ecx
jne 0x4041aa
cmp dword [esi + 0x84], 0
je 0x404215
mov ebx, dword [esi + 0x80]
add ebx, edi
jne 0x4042ab
mov dword [ebp - 0x14], edi
mov eax, dword [ebp - 0x14]
pop edi
pop esi
pop ebx
leave
ret
mov esi, 0x405018
push 0x4010d0
mov eax, esi
call fcn.004049ed
push 0x40135c
jmp 0x4042e5
lea esi, [eax + edi]
call fcn.00403fbc
sub eax, dword [0x405014]
cmp eax, 0xfff
ja 0x404185
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
mov dword [ebp + 8], eax
je 0x4042b7
mov esi, dword [ebx]
add esi, edi
mov edi, dword [ebx + 0x10]
add edi, dword [ebp - 8]
jmp 0x40429f
mov ecx, 0x80000000
mov edx, eax
and edx, ecx
cmp edx, ecx
je 0x404284
mov ecx, dword [ebp - 8]
lea eax, [eax + ecx + 2]
jmp 0x404289
and eax, 0xffff
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4042cf
mov dword [edi], eax
add esi, 4
add edi, 4
mov eax, dword [esi]
test eax, eax
jne 0x40426e
mov edi, dword [ebp - 8]
add ebx, 0x14
mov eax, dword [ebx + 0xc]
test eax, eax
jne 0x40423b
jmp 0x404215
mov esi, 0x405018
push 0x4010d0
mov eax, esi
call fcn.004049ed
push 0x40136c
jmp 0x4042e5
mov esi, 0x405018
push 0x4010d0
mov eax, esi
call fcn.004049ed
push 0x40137c
call fcn.004049b4
jmp 0x404218