Function at 0x405180
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x28], edi
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x24], eax
mov ebx, 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x20], 0
mov ecx, edx
movzx eax, word [edx]
cmp eax, 0x5a4d
jne 0x40541d
mov eax, dword [edx + 0x3c]
add eax, ecx
mov dword [ebp - 0x10], eax
mov edx, dword [ebp - 0x10]
mov eax, dword [edx]
cmp eax, 0x4550
jne 0x40541d
mov eax, dword [ebp - 0x10]
movzx edx, word [eax + 6]
mov eax, dword [ebp - 0x10]
add eax, 0xf8
mov esi, eax
mov edi, edx
mov dword [ebp - 0x1c], 1
cmp edi, dword [ebp - 0x1c]
jb 0x405257
dec dword [ebp - 0x1c]
nop
inc dword [ebp - 0x1c]
mov edx, dword [ebp - 0x24]
mov eax, dword [edx]
add eax, 0xafe
push eax
mov eax, esi
push eax
mov eax, dword [ebp - 0x24]
mov edx, dword [eax + 0x8b2]
call edx
test eax, eax
je 0x405226
mov ebx, esi
mov edx, dword [ebp - 0x24]
mov eax, dword [edx]
add eax, 0xb05
push eax
mov eax, esi
push eax
mov edx, dword [ebp - 0x24]
mov eax, dword [edx + 0x8b2]
call eax
test eax, eax
je 0x405246
mov dword [ebp - 0x14], esi
mov eax, 0x28
mul dword [ebp - 0x1c]
add eax, esi
mov esi, eax
cmp edi, dword [ebp - 0x1c]
ja 0x405204
test ebx, ebx
je 0x40541d
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x40541d
mov eax, dword [ebx + 0x10]
sub eax, 6
mov esi, eax
mov dword [ebp - 0x1c], 0
cmp esi, dword [ebp - 0x1c]
jb 0x4052c5
dec dword [ebp - 0x1c]
lea esi, [esi]
inc dword [ebp - 0x1c]
push 5
mov edx, dword [ebp - 0x24]
mov eax, dword [edx]
add eax, 0xb0b
push eax
mov eax, dword [ebp - 0x10]
mov edx, dword [eax + 0x34]
mov eax, dword [ebx + 0xc]
add edx, eax
add edx, dword [ebp - 0x1c]
push edx
call fcn.004018a0
test al, al
je 0x4052c0
mov eax, dword [ebp - 0x10]
mov edx, dword [eax + 0x34]
mov eax, dword [ebx + 0xc]
add edx, eax
add edx, dword [ebp - 0x1c]
inc edx
mov dword [ebp - 4], edx
jmp 0x4052c5
cmp esi, dword [ebp - 0x1c]
ja 0x405284
mov eax, dword [ebp - 4]
test eax, eax
je 0x40541d
mov byte [ebp - 0xc], 0x68
push 0
push 4
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0xb]
push eax
push 0xffffffffffffffff
mov edx, dword [ebp - 0x24]
mov eax, dword [edx + 0x7ea]
call eax
mov byte [ebp - 7], 0xe8
mov edx, dword [ebp - 0x14]
mov eax, dword [edx + 0x10]
sub eax, 6
mov ebx, eax
mov dword [ebp - 0x1c], 0
cmp ebx, dword [ebp - 0x1c]
jb 0x40534b
dec dword [ebp - 0x1c]
nop
inc dword [ebp - 0x1c]
push 6
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x34]
mov eax, dword [ebp - 0x14]
mov edx, dword [eax + 0xc]
add ecx, edx
add ecx, dword [ebp - 0x1c]
push ecx
call fcn.004018a0
test al, al
je 0x405346
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x34]
mov edx, dword [ebp - 0x14]
mov eax, dword [edx + 0xc]
add ecx, eax
add ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x18], ecx
jmp 0x40534b
cmp ebx, dword [ebp - 0x1c]
ja 0x40530c
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x40541d
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
dec dword [ebp - 0x1c]
nop
inc dword [ebp - 0x1c]
mov eax, dword [ebp - 0x1c]
add eax, dword [ebp - 0x18]
mov al, byte [eax]
cmp al, 0xe8
jne 0x4053af
push dword [ebp - 0x24]
mov eax, dword [ebp - 0x1c]
add eax, dword [ebp - 0x18]
push eax
call fcn.00401900
cmp eax, 5
jne 0x4053af
mov eax, dword [ebp - 0x20]
inc eax
mov dword [ebp - 0x20], eax
cmp eax, 2
jne 0x4053af
mov eax, dword [ebp - 0x1c]
add eax, dword [ebp - 0x18]
inc eax
mov esi, dword [eax]
mov eax, dword [ebp - 0x1c]
add eax, dword [ebp - 0x18]
add eax, 5
add eax, esi
mov ebx, eax
jmp 0x4053b5
cmp dword [ebp - 0x1c], 0x21
jb 0x405368
test ebx, ebx
je 0x40541d
mov byte [ebp - 0xc], 0x5f
mov byte [ebp - 0xb], 0xc7
mov byte [ebp - 0xa], 5
mov dword [ebp - 0x1c], 0
dec dword [ebp - 0x1c]
nop
inc dword [ebp - 0x1c]
push 3
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x1c]
add eax, ebx
push eax
call fcn.004018a0
test al, al
je 0x405414
mov eax, dword [ebp - 0x1c]
add eax, ebx
add eax, 3
mov esi, dword [eax]
mov eax, esi
add eax, 8
mov edx, dword [eax]
mov eax, dword [ebp - 0x24]
mov dword [eax + 0x996], edx
mov eax, esi
add eax, 0xc
mov edx, dword [eax]
mov eax, dword [ebp - 0x24]
mov dword [eax + 0x992], edx
jmp 0x40541d
cmp dword [ebp - 0x1c], 0x123
jb 0x4053d0
mov ebx, dword [ebp - 0x30]
mov esi, dword [ebp - 0x2c]
mov edi, dword [ebp - 0x28]
leave
ret 8