Function at 0x4017a0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push eax
mov eax, 0xa
add esp, 0xfffff004
push eax
dec eax
jne 0x4017a9
mov eax, dword [ebp - 4]
add esp, 0xfffffb88
push ebx
push esi
push edi
mov byte [ebp - 1], 0
push 0x104
call fcn.00401e88
pop ecx
mov dword [ebp - 8], eax
push 0x104
push 0
mov eax, dword [ebp - 8]
push eax
call fcn.00403174
add esp, 0xc
push 0x104
mov edx, dword [ebp - 8]
push edx
push 0
call sub.KERNEL32.DLL_GetModuleFileNameA
test eax, eax
je 0x401b2b
mov ecx, dword [0x40a11c]
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.00403104
add esp, 0xc
cmp word [ebp - 0x64], 0x5a4d
jne 0x401b21
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.00403104
add esp, 0xc
cmp dword [ebp - 0x15c], 0x4550
jne 0x401b21
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.00401e88
pop ecx
mov dword [ebp - 0x18], eax
push esi
push 0
mov edx, dword [ebp - 0x18]
push edx
call fcn.00403174
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.00403104
add esp, 0xc
push ebx
mov edx, dword [ebp + 8]
push edx
push esi
call fcn.00403104
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 0x4018da
mov eax, ebx
jmp 0x4018e3
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 0x40192c
mov eax, dword [ebx]
push eax
mov edx, dword [ebp + 8]
add edx, dword [ebx + 4]
push edx
push esi
call fcn.00403104
add esp, 0xc
mov eax, dword [ebx - 8]
mov ecx, dword [ebp - 0x124]
xor edx, edx
div ecx
test edx, edx
jne 0x40191a
mov eax, dword [ebx - 8]
jmp 0x401924
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 0x4018f1
push 0x44
push 0
lea eax, [ebp - 0xa1a0]
push eax
call fcn.00403174
add esp, 0xc
lea edx, [ebp - 0xa1b0]
push 0x10
push 0
push edx
call fcn.00403174
add esp, 0xc
lea ecx, [ebp - 0xa47c]
push 0x2cc
push 0
push ecx
call fcn.00403174
add esp, 0xc
mov dword [ebp - 0xa1a0], 0x44
mov eax, dword [ebp + 0xc]
push eax
call fcn.00403254
pop ecx
test eax, eax
jbe 0x4019ac
push 0x40a569
mov edx, dword [ebp - 8]
push edx
call fcn.00403218
add esp, 8
mov ecx, dword [ebp + 0xc]
push ecx
mov eax, dword [ebp - 8]
push eax
call fcn.00403218
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 [0x40a100]
test eax, eax
je 0x401b17
mov dword [ebp - 0xa47c], 0x10007
lea edx, [ebp - 0xa47c]
push edx
mov ecx, dword [ebp - 0xa1ac]
push ecx
call dword [0x40a110]
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x128]
jne 0x401a2b
mov edx, dword [ebp - 0x14]
cmp edx, dword [ebp - 0x10]
jg 0x401a2b
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 [0x40a0fc]
jmp 0x401a5f
mov eax, dword [ebp - 0xc]
push eax
mov edx, dword [ebp - 0xa1b0]
push edx
call dword [0x40a118]
test eax, eax
jne 0x401a5f
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 [0x40a10c]
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 [0x40a104]
test eax, eax
je 0x401b17
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 [0x40a104]
test eax, eax
je 0x401b17
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 [0x40a114]
mov ecx, dword [ebp - 0xc]
cmp ecx, dword [ebp - 0x128]
jne 0x401b06
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x10]
jg 0x401b06
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 [0x40a0fc]
mov ecx, dword [ebp - 0xa1ac]
push ecx
call dword [0x40a108]
mov byte [ebp - 1], 1
mov eax, dword [ebp - 0x18]
push eax
call fcn.00401cc0
pop ecx
mov edx, dword [ebp - 8]
push edx
call fcn.00401cc0
pop ecx
mov al, byte [ebp - 1]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret