Function at 0x404090
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
mov ecx, dword [esp + 8]
sub esp, 0x28
push ebx
push ebp
push esi
xor esi, esi
cmp ecx, 0x40
push edi
jae 0x4040b6
push 0xd
call fcn.00403190
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
mov eax, dword [esp + 0x3c]
cmp word [eax], 0x5a4d
je 0x4040d8
push 0xc1
call fcn.00403190
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
mov edi, dword [eax + 0x3c]
lea edx, [edi + 0xf8]
cmp ecx, edx
jae 0x4040f9
push 0xd
call fcn.00403190
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
add edi, eax
mov dword [esp + 0x10], edi
cmp dword [edi], 0x4550
je 0x40411e
push 0xc1
call fcn.00403190
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
cmp word [edi + 4], 0x14c
je 0x40413d
push 0xc1
call fcn.00403190
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
mov ebx, dword [edi + 0x38]
test bl, 1
je 0x40415c
push 0xc1
call fcn.00403190
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
xor eax, eax
mov ax, word [edi + 0x14]
lea ecx, [eax + edi + 0x18]
xor eax, eax
mov ax, word [edi + 6]
test eax, eax
jbe 0x40418c
add ecx, 0xc
mov edx, eax
mov eax, dword [ecx + 4]
test eax, eax
jne 0x40417e
mov eax, ebx
add eax, dword [ecx]
cmp eax, esi
jbe 0x404186
mov esi, eax
add ecx, 0x28
dec edx
jne 0x404175
lea ecx, [esp + 0x14]
push ecx
call fcn.004031c0
mov ecx, dword [esp + 0x1c]
mov edx, dword [edi + 0x50]
add esp, 4
lea eax, [ecx - 1]
lea ebp, [edx + ecx - 1]
not eax
lea ecx, [ecx + esi - 1]
and ebp, eax
and ecx, eax
cmp ebp, ecx
je 0x4041cc
push 0xc1
call fcn.00403190
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
mov esi, dword [esp + 0x58]
mov edx, dword [edi + 0x34]
push esi
push 4
push 0x3000
push ebp
push edx
call dword [esp + 0x58]
mov ebx, eax
add esp, 0x14
test ebx, ebx
jne 0x404215
push esi
push 4
push 0x3000
push ebp
push eax
call dword [esp + 0x58]
mov ebx, eax
add esp, 0x14
test ebx, ebx
jne 0x404215
push 0xe
call fcn.00403190
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
push 0x3c
call fcn.00403510
mov ebp, eax
test ebp, ebp
jne 0x404242
push esi
push 0x8000
push eax
push ebx
call dword [esp + 0x58]
push 0xe
call fcn.00403190
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
mov dword [ebp + 4], ebx
mov ax, word [edi + 0x16]
mov edx, dword [esp + 0x48]
mov ecx, dword [esp + 0x44]
shr eax, 0xd
and eax, 1
mov dword [ebp + 0x20], edx
mov edx, dword [esp + 0x50]
mov dword [ebp + 0x14], eax
mov eax, dword [esp + 0x4c]
mov dword [ebp + 0x1c], ecx
mov dword [ebp + 0x24], eax
mov eax, dword [esp + 0x54]
mov dword [ebp + 0x28], edx
mov dword [ebp + 0x2c], eax
mov dword [ebp + 0x30], esi
mov edx, dword [esp + 0x18]
mov dword [ebp + 0x38], edx
mov eax, dword [edi + 0x54]
cmp dword [esp + 0x40], eax
jae 0x40428f
push 0xd
jmp 0x40435f
push esi
push 4
push 0x1000
push eax
push ebx
call ecx
mov ecx, dword [edi + 0x54]
mov esi, dword [esp + 0x50]
mov edx, ecx
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, dword [esp + 0x50]
and ecx, 3
add esp, 0x14
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [edx + 0x3c]
add ecx, eax
mov dword [ebp], ecx
mov dword [ecx + 0x34], ebx
mov ecx, dword [esp + 0x5c]
test ecx, ecx
je 0x4042da
mov word [eax], 0
mov eax, dword [ebp]
mov dword [eax], 0
mov esi, dword [esp + 0x10]
mov ecx, dword [esp + 0x40]
push ebp
push esi
push ecx
push edx
call fcn.004043b0
add esp, 0x10
test eax, eax
je 0x404367
mov edx, dword [ebp]
mov ecx, dword [esi + 0x34]
mov eax, dword [edx + 0x34]
sub eax, ecx
je 0x40430e
push eax
push ebp
call fcn.00404740
add esp, 8
mov dword [ebp + 0x18], eax
jmp 0x404315
mov dword [ebp + 0x18], 1
push ebp
call fcn.004047d0
add esp, 4
test eax, eax
je 0x404367
push ebp
call fcn.004044d0
add esp, 4
test eax, eax
je 0x404367
push ebp
call fcn.004046f0
add esp, 4
test eax, eax
je 0x404367
mov eax, dword [ebp]
mov eax, dword [eax + 0x28]
test eax, eax
je 0x40439a
mov ecx, dword [ebp + 0x14]
test ecx, ecx
je 0x40438b
push 0
push 1
add eax, ebx
push ebx
call eax
test eax, eax
jne 0x40437a
push 0x45a
call fcn.00403190
add esp, 4
push ebp
call fcn.00404a60
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
pop edi
mov dword [ebp + 0x10], 1
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
add eax, ebx
pop edi
mov dword [ebp + 0x34], eax
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
pop edi
mov dword [ebp + 0x34], 0
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x28
ret