Function at 0x401778
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push eax
mov eax, 0xa
add esp, 0xfffff004
push eax
dec eax
jne 0x401781
mov eax, dword [ebp - 4]
add esp, 0xfffffb88
push ebx
push esi
push edi
mov byte [ebp - 1], 0
push 0x104
call fcn.00401ec0
pop ecx
mov dword [ebp - 8], eax
push 0x104
push 0
mov eax, dword [ebp - 8]
push eax
call fcn.004031ac
add esp, 0xc
push 0x104
mov edx, dword [ebp - 8]
push edx
push 0
call sub.KERNEL32.DLL_GetModuleFileNameA
test eax, eax
je 0x401b03
mov ecx, dword [0x40a114]
mov dword [ebp - 0xc], ecx
xor eax, eax
mov dword [ebp - 0x10], eax
push 0x40
mov edx, dword [ebp + 8]
push edx
lea ecx, [ebp - 0x64]
push ecx
call fcn.0040313c
add esp, 0xc
cmp word [ebp - 0x64], 0x5a4d
jne 0x401af9
push 0xf8
mov edi, dword [ebp + 8]
mov eax, edi
add eax, dword [ebp - 0x28]
push eax
lea edx, [ebp - 0x15c]
push edx
call fcn.0040313c
add esp, 0xc
cmp dword [ebp - 0x15c], 0x4550
jne 0x401af9
mov ecx, dword [ebp - 0x10c]
mov dword [ebp - 0x14], ecx
mov ebx, dword [ebp - 0x108]
mov esi, dword [ebp - 0x14]
mov eax, esi
shl eax, 2
push eax
call fcn.00401ec0
pop ecx
mov dword [ebp - 0x18], eax
push esi
push 0
mov edx, dword [ebp - 0x18]
push edx
call fcn.004031ac
movzx edx, word [ebp - 0x156]
mov eax, edi
mov ecx, edx
add eax, dword [ebp - 0x28]
add esp, 0xc
add eax, 0xf8
mov esi, dword [ebp - 0x18]
shl ecx, 3
lea ecx, [ecx + ecx*4]
push ecx
push eax
lea eax, [ebp - 0xa15c]
push eax
call fcn.0040313c
add esp, 0xc
push ebx
mov edx, dword [ebp + 8]
push edx
push esi
call fcn.0040313c
add esp, 0xc
mov ebx, dword [ebp - 0x108]
mov eax, ebx
mov ecx, dword [ebp - 0x124]
xor edx, edx
div ecx
test edx, edx
jne 0x4018b2
mov eax, ebx
jmp 0x4018bb
mov eax, ebx
xor edx, edx
div ecx
inc eax
imul ecx
add eax, esi
mov esi, eax
xor edi, edi
lea ebx, [ebp - 0xa14c]
jmp 0x401904
mov eax, dword [ebx]
push eax
mov edx, dword [ebp + 8]
add edx, dword [ebx + 4]
push edx
push esi
call fcn.0040313c
add esp, 0xc
mov eax, dword [ebx - 8]
mov ecx, dword [ebp - 0x124]
xor edx, edx
div ecx
test edx, edx
jne 0x4018f2
mov eax, dword [ebx - 8]
jmp 0x4018fc
mov eax, dword [ebx - 8]
xor edx, edx
div ecx
inc eax
imul ecx
add eax, esi
mov esi, eax
inc edi
add ebx, 0x28
movzx ecx, word [ebp - 0x156]
cmp edi, ecx
jl 0x4018c9
push 0x44
push 0
lea eax, [ebp - 0xa1a0]
push eax
call fcn.004031ac
add esp, 0xc
lea edx, [ebp - 0xa1b0]
push 0x10
push 0
push edx
call fcn.004031ac
add esp, 0xc
lea ecx, [ebp - 0xa47c]
push 0x2cc
push 0
push ecx
call fcn.004031ac
add esp, 0xc
mov dword [ebp - 0xa1a0], 0x44
mov eax, dword [ebp + 0xc]
push eax
call fcn.0040328c
pop ecx
test eax, eax
jbe 0x401984
push 0x40a26c
mov edx, dword [ebp - 8]
push edx
call fcn.00403250
add esp, 8
mov ecx, dword [ebp + 0xc]
push ecx
mov eax, dword [ebp - 8]
push eax
call fcn.00403250
add esp, 8
lea edx, [ebp - 0xa1b0]
lea ecx, [ebp - 0xa1a0]
push edx
push ecx
push 0
push 0
push 4
push 0
push 0
push 0
mov eax, dword [ebp - 8]
push eax
push 0
call dword [0x40a0f8]
test eax, eax
je 0x401aef
mov dword [ebp - 0xa47c], 0x10007
lea edx, [ebp - 0xa47c]
push edx
mov ecx, dword [ebp - 0xa1ac]
push ecx
call dword [0x40a108]
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x128]
jne 0x401a03
mov edx, dword [ebp - 0x14]
cmp edx, dword [ebp - 0x10]
jg 0x401a03
lea ecx, [ebp - 0x1c]
push ecx
push 0x40
mov eax, dword [ebp - 0x14]
push eax
mov edx, dword [ebp - 0x128]
push edx
mov ecx, dword [ebp - 0xa1b0]
push ecx
call dword [0x40a0f4]
jmp 0x401a37
mov eax, dword [ebp - 0xc]
push eax
mov edx, dword [ebp - 0xa1b0]
push edx
call dword [0x40a110]
test eax, eax
jne 0x401a37
push 0x40
push 0x3000
mov ecx, dword [ebp - 0x14]
push ecx
mov eax, dword [ebp - 0x128]
push eax
mov edx, dword [ebp - 0xa1b0]
push edx
call dword [0x40a104]
lea ecx, [ebp - 0x20]
push ecx
mov eax, dword [ebp - 0x14]
push eax
mov edx, dword [ebp - 0x18]
push edx
mov ecx, dword [ebp - 0x128]
push ecx
mov eax, dword [ebp - 0xa1b0]
push eax
call dword [0x40a0fc]
test eax, eax
je 0x401aef
lea edx, [ebp - 0x20]
lea ecx, [ebp - 0x128]
push edx
push 4
push ecx
mov eax, dword [ebp - 0xa3d8]
add eax, 8
push eax
mov edx, dword [ebp - 0xa1b0]
push edx
call dword [0x40a0fc]
test eax, eax
je 0x401aef
mov ecx, dword [ebp - 0x128]
lea eax, [ebp - 0xa47c]
add ecx, dword [ebp - 0x134]
mov dword [ebp - 0xa3cc], ecx
push eax
mov edx, dword [ebp - 0xa1ac]
push edx
call dword [0x40a10c]
mov ecx, dword [ebp - 0xc]
cmp ecx, dword [ebp - 0x128]
jne 0x401ade
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x10]
jg 0x401ade
push 0
mov edx, dword [ebp - 0x24]
push edx
mov ecx, dword [ebp - 0x14]
push ecx
mov eax, dword [ebp - 0x128]
push eax
mov edx, dword [ebp - 0xa1b0]
push edx
call dword [0x40a0f4]
mov ecx, dword [ebp - 0xa1ac]
push ecx
call dword [0x40a100]
mov byte [ebp - 1], 1
mov eax, dword [ebp - 0x18]
push eax
call fcn.00401cf8
pop ecx
mov edx, dword [ebp - 8]
push edx
call fcn.00401cf8
pop ecx
mov al, byte [ebp - 1]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret