Function at 0x406cb0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x444
mov eax, dword [0x4224ec]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [0x41b110]
push edi
mov edi, ecx
mov ecx, dword [ebp + 0xc]
push 0x41b49c
mov dword [edi], 0
mov dword [edi + 0x20], eax
mov dword [edi + 0x24], ecx
call ebx
mov dword [ebp - 0x434], eax
mov eax, dword [edi + 0x20]
mov edx, 0x5a4d
mov dword [edi + 4], eax
cmp word [eax], dx
je 0x406d1b
call fcn.00401530
mov dword [edi], 0
mov eax, edi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004077ff
mov esp, ebp
pop ebp
ret 8
add eax, dword [eax + 0x3c]
mov dword [edi + 8], eax
cmp dword [eax], 0x4550
je 0x406d75
push 0
call dword [0x41b05c]
push 0
push 0
push 0x1f0001
call dword [0x41b0ec]
call dword [0x41b058]
push eax
call dword [0x41b054]
call dword [0x41b050]
push 1
call dword [0x41b1cc]
mov dword [edi], 0
mov eax, edi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004077ff
mov esp, ebp
pop ebp
ret 8
mov edx, dword [eax + 0x50]
mov eax, dword [eax + 0x34]
push esi
push 0x40
push 0x1000
push edx
push eax
lea ecx, [ebp - 0x430]
push ecx
call fcn.00405ee0
mov edx, dword [ebp - 0x430]
mov esi, dword [0x41b048]
push 0
push 0
push 1
mov dword [edi + 0xc], edx
call esi
call dword [0x41b1e4]
push 0
call dword [0x41b05c]
push 0
call ebx
call dword [0x41b058]
push eax
call dword [0x41b054]
mov ebx, dword [0x41b1dc]
push 0x12
call ebx
push 0x64
push 0
push 0
push 1
call esi
push eax
call dword [0x41b0f0]
call dword [0x41b03c]
push 8
call ebx
push 0xb
call dword [0x41b044]
push 5
call dword [0x41b040]
xor ebx, ebx
push ebx
push ebx
push 0x1f0001
call dword [0x41b0ec]
cmp dword [edi + 0xc], ebx
jne 0x406f0a
push 0x20a
lea ecx, [ebp - 0x20e]
xor eax, eax
push ebx
push ecx
mov word [ebp - 0x210], ax
call fcn.00408610
add esp, 0xc
lea edx, [ebp - 0x210]
push edx
push 0x105
call dword [0x41b04c]
test eax, eax
je 0x406ee2
push 0x208
lea ecx, [ebp - 0x41a]
xor eax, eax
push ebx
push ecx
mov word [ebp - 0x41c], ax
call fcn.00408610
add esp, 0xc
lea edx, [ebp - 0x41c]
push edx
push 0x3ed
push 0x41b320
lea eax, [ebp - 0x210]
push eax
call dword [0x41b06c]
test eax, eax
je 0x406ee2
push ebx
push 0x100
push 2
push ebx
push 1
push 0x10000000
lea ecx, [ebp - 0x41c]
push ecx
call dword [0x41b068]
mov esi, eax
cmp esi, 0xffffffff
je 0x406ee2
lea edx, [ebp - 0x42c]
push edx
call dword [0x41b064]
push ebx
lea eax, [ebp - 0x430]
push eax
push 0x10
lea ecx, [ebp - 0x42c]
push ecx
push esi
mov dword [ebp - 0x430], ebx
call dword [0x41b060]
push esi
call dword [0x41b034]
mov edx, dword [edi + 8]
mov eax, dword [edx + 0x50]
push 0x40
push 0x2000
push eax
push ebx
call dword [0x41b09c]
mov dword [edi + 0xc], eax
cmp eax, ebx
jne 0x406f0a
call fcn.00405d60
mov dword [edi], ebx
jmp 0x407144
lea esi, [ebp - 0x430]
call fcn.00405fb0
mov ecx, dword [ebp - 0x430]
push 0x14
push ebx
push ecx
lea edx, [ebp - 0x430]
push edx
call fcn.00406020
mov eax, dword [ebp - 0x430]
mov ecx, dword [edi + 0xc]
mov dword [edi], eax
mov dword [eax + 4], ecx
mov eax, dword [edi + 0x24]
cmp eax, ebx
je 0x406f45
mov edx, dword [edi + 0xc]
mov dword [eax], edx
mov eax, dword [edi]
mov dword [eax + 0xc], ebx
mov ecx, dword [edi]
mov dword [ecx + 8], ebx
mov edx, dword [edi]
mov dword [edx + 0x10], ebx
mov eax, dword [edi + 8]
mov esi, dword [eax + 0x50]
mov ebx, dword [edi + 0xc]
call fcn.00405d60
push 0x40
push 0x1000
push esi
push ebx
call dword [0x41b09c]
mov ecx, dword [edi + 8]
mov ebx, dword [edi + 0xc]
mov dword [edi + 0x10], eax
mov esi, dword [ecx + 0x54]
call fcn.00405de0
push 0x40
push 0x1000
push esi
push ebx
call dword [0x41b09c]
mov ecx, dword [edi + 4]
mov edx, dword [edi + 8]
mov dword [edi + 0x10], eax
mov esi, dword [ecx + 0x3c]
add esi, dword [edx + 0x54]
push esi
push ecx
push eax
call fcn.00407af0
mov eax, dword [edi + 4]
mov ecx, dword [eax + 0x3c]
add ecx, dword [edi + 0x10]
mov edx, dword [edi]
mov dword [edx], ecx
mov eax, dword [edi]
mov ecx, dword [eax]
mov edx, dword [edi + 0xc]
mov dword [ecx + 0x34], edx
mov eax, dword [edi]
mov ecx, dword [edi + 8]
mov edx, dword [edi + 0x20]
push eax
push ecx
push edx
call fcn.00406190
mov ecx, dword [edi + 8]
mov eax, dword [edi + 0xc]
add esp, 0x18
sub eax, dword [ecx + 0x34]
mov dword [edi + 0x14], eax
je 0x406feb
push eax
mov eax, dword [edi]
call fcn.00405e50
add esp, 4
mov ecx, dword [edi]
call fcn.004069b0
test eax, eax
je 0x407129
mov edx, dword [ebp - 0x434]
push str.VirtualProtect
push edx
call dword [0x41b0fc]
mov dword [ebp - 0x43c], eax
mov eax, dword [edi]
mov ebx, dword [eax]
mov dword [ebp - 0x438], eax
movzx eax, word [ebx + 0x14]
xor ecx, ecx
lea eax, [eax + ebx + 0x3c]
mov dword [ebp - 0x430], 0
cmp cx, word [ebx + 6]
jae 0x407106
mov dword [ebp - 0x434], eax
mov edx, dword [ebp - 0x434]
mov eax, dword [edx]
mov ecx, eax
mov edx, eax
shr ecx, 0x1d
shr edx, 0x1e
mov esi, eax
and ecx, 1
and edx, 1
shr esi, 0x1f
test eax, 0x2000000
je 0x407084
mov eax, dword [ebp - 0x434]
mov ecx, dword [eax - 0x14]
mov edx, dword [eax - 0x1c]
push 0x4000
push ecx
push edx
lea esi, [ebp - 0x440]
call fcn.00406090
jmp 0x4070de
lea ecx, [edx + ecx*2]
lea edx, [esi + ecx*2]
mov edx, dword [edx*4 + 0x4224cc]
test eax, 0x4000000
je 0x40709e
or edx, 0x200
mov ecx, dword [ebp - 0x434]
mov ecx, dword [ecx - 0x14]
test ecx, ecx
jne 0x4070bf
test al, 0x40
je 0x4070b4
mov ecx, dword [ebx + 0x20]
jmp 0x4070bb
test al, al
jns 0x4070de
mov ecx, dword [ebx + 0x24]
test ecx, ecx
je 0x4070de
mov eax, dword [ebp - 0x43c]
test eax, eax
je 0x4070de
lea esi, [ebp - 0x444]
push esi
push edx
mov edx, dword [ebp - 0x434]
push ecx
mov ecx, dword [edx - 0x1c]
push ecx
call eax
mov edx, dword [ebp - 0x438]
mov ebx, dword [edx]
mov eax, dword [ebp - 0x430]
movzx ecx, word [ebx + 6]
add dword [ebp - 0x434], 0x28
inc eax
mov dword [ebp - 0x430], eax
cmp eax, ecx
jl 0x407040
mov edx, dword [edi]
mov eax, dword [edx]
mov eax, dword [eax + 0x28]
test eax, eax
je 0x407144
mov ecx, dword [edi + 0xc]
add eax, ecx
mov dword [edi + 0x18], eax
je 0x407129
push 0
push 1
push ecx
call eax
mov dword [edi + 0x1c], eax
test eax, eax
jne 0x40713b
push 0
mov dword [edi], 0
call fcn.00406100
add esp, 4
jmp 0x407144
mov ecx, dword [edi]
mov dword [ecx + 0x10], 1
mov ecx, dword [ebp - 4]
pop esi
mov eax, edi
pop edi
xor ecx, ebp
pop ebx
call fcn.004077ff
mov esp, ebp
pop ebp
ret 8