Function at 0x4175e7
Capabilities:
Check for peb beingdebugged flag

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x478bbe
mov eax, dword fs:[0]
push eax
sub esp, 0x3d0
mov eax, dword [0x49a618]
xor eax, esp
mov dword [esp + 0x3c8], eax
push ebx
push esi
push edi
mov eax, dword [0x49a618]
xor eax, esp
push eax
lea eax, [esp + 0x3e0]
mov dword fs:[0], eax
mov dword [esp + 0x28], ecx
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
push ecx
mov dword [esp + 0x48], ecx
mov dword [esp + 0x20], eax
call dword [0x481348]
xor edi, edi
mov ebx, eax
push 0x38
lea eax, [esp + 0xe0]
mov dword [esp + 0x30], ebx
push edi
push eax
mov dword [esp + 0x3c], edi
mov dword [esp + 0xe4], edi
call fcn.0045c590
add esp, 0xc
mov dword [esp + 0x16c], edi
lea eax, [esp + 0x170]
push 0x58
push edi
push eax
call fcn.0045c590
add esp, 0xc
lea eax, [esp + 0x16c]
push edi
push eax
push edi
push 0x1f
call dword [0x481338]
lea eax, [esp + 0x16c]
push eax
call dword [0x481094]
push eax
push ebx
lea ecx, [esp + 0xb8]
call fcn.0041a09b
lea eax, [esp + 0xd8]
mov dword [esp + 0x3e8], edi
push eax
push ebx
call dword [0x481090]
mov eax, dword [esp + 0xd8]
lea edx, [esp + 0x14]
push 0x10
pop ebx
lea esi, [esp + 0x18]
mov dword [esp + 0x14], ebx
lea ecx, [eax + 2]
cmp ecx, ebx
mov dword [esp + 0x18], ecx
push 0x200
cmovge edx, esi
push edi
mov ecx, dword [edx]
cdq
add ecx, 4
sub eax, edx
mov dword [esp + 0x2c], ecx
sar eax, 1
add eax, 2
mov dword [esp + 0x1c], edi
mov dword [esp + 0x48], eax
xor eax, eax
mov word [esp + 0x1d4], ax
lea eax, [esp + 0x1d6]
push eax
mov dword [esp + 0x24], edi
call fcn.0045c590
mov ebx, edi
mov dword [esp + 0x48], edi
mov esi, edi
mov dword [esp + 0x40], ebx
add esp, 0xc
mov dword [esp + 0x38], esi
push dword [esp + 0x1c]
mov byte [esp + 0x3ec], 1
call dword [0x48133c]
mov dword [esp + 0x4c], eax
mov dword [esp + 0x20], edi
test eax, eax
jle 0x417941
push 0xa
pop ecx
xor eax, eax
mov dword [esp + 0x50], 0x30
mov dword [esp + 0x54], 0x16
lea edi, [esp + 0x58]
rep stosd dword es:[edi], eax
mov edi, dword [esp + 0x1c]
mov word [esp + 0x1cc], ax
lea eax, [esp + 0x1cc]
mov dword [esp + 0x74], eax
lea eax, [esp + 0x50]
push eax
push 1
push ebx
push edi
mov dword [esp + 0x88], 0x100
call dword [0x481334]
test eax, eax
je 0x41792a
xor eax, eax
mov ecx, 0x100
mov word [esp + 0x3cc], ax
mov eax, dword [esp + 0x58]
test ecx, eax
jne 0x417860
or eax, ecx
mov dword [esp + 0x58], eax
lea eax, [esp + 0x50]
push eax
push 1
push ebx
push edi
call dword [0x481340]
test eax, eax
je 0x41792a
test dword [esp + 0x58], 0x800
jne 0x417860
lea eax, [esp + 0x1cc]
push eax
lea ecx, [esp + 0xc4]
call fcn.00401b20
mov ecx, dword [esp + 0x28]
mov byte [esp + 0x3e8], 2
cmp dword [esp + 0x64], 0
je 0x417821
lea eax, [esp + 0x64]
add ecx, 0xc
push eax
call fcn.00417e2a
jmp 0x417836
mov eax, dword [esp + 0x60]
add ecx, 4
mov dword [esp + 0x48], eax
lea eax, [esp + 0x48]
push eax
call fcn.00417d9a
lea ecx, [esp + 0xc0]
cmp eax, ecx
je 0x41784c
push 0xffffffffffffffff
push esi
push ecx
mov ecx, eax
call fcn.00402500
lea ecx, [esp + 0xc0]
mov byte [esp + 0x3e8], 1
call fcn.00401b80
push 1
push ebx
push edi
push dword [esp + 0x34]
lea ecx, [esp + 0x124]
call fcn.00418fa6
mov edi, dword [esp + 0x2c]
lea ecx, [esp + 0x114]
push edi
mov byte [esp + 0x3ec], 3
call fcn.0041926d
mov ecx, dword [esp + 0x14]
cmp eax, ecx
push edi
cmovg ecx, eax
mov dword [esp + 0x18], ecx
lea ecx, [esp + 0x118]
call fcn.0041939f
mov ecx, dword [esp + 0x18]
cmp eax, ecx
cmovg ecx, eax
test dword [esp + 0x58], 0x800
mov dword [esp + 0x18], ecx
je 0x417904
push 0xa
pop ecx
xor eax, eax
mov dword [esp + 0x80], 0x30
mov dword [esp + 0x84], 0x20
lea edi, [esp + 0x88]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 0xa0], eax
lea eax, [esp + 0x80]
push eax
push 1
push ebx
push dword [esp + 0x28]
call dword [0x481340]
jmp 0x417916
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x38]
call fcn.00417e91
mov ebx, dword [esp + 0x20]
lea ecx, [esp + 0x114]
mov byte [esp + 0x3e8], 1
call fcn.004190c2
inc ebx
mov dword [esp + 0x20], ebx
cmp ebx, dword [esp + 0x4c]
jl 0x417755
mov esi, dword [esp + 0x38]
mov ebx, dword [esp + 0x34]
sub esi, ebx
sar esi, 2
test esi, esi
je 0x4179c4
mov eax, dword [esp + 0x18]
movzx eax, al
shl ax, 8
movzx edx, ax
mov eax, dword [esp + 0x14]
movzx eax, ax
shl eax, 0x10
or edx, eax
mov eax, dword [esp + 0x24]
movzx eax, al
or edx, eax
mov dword [esp + 0x24], edx
push 0xa
pop ecx
xor eax, eax
mov dword [esp + 0x80], 0x30
mov dword [esp + 0x84], 0x20
lea edi, [esp + 0x88]
rep stosd dword es:[edi], eax
mov edi, dword [esp + 0x30]
lea eax, [esp + 0x80]
push eax
push 1
mov dword [esp + 0xa8], edx
push dword [ebx + edi*4]
push dword [esp + 0x28]
call dword [0x481340]
mov edx, dword [esp + 0x24]
inc edi
mov dword [esp + 0x30], edi
cmp edi, esi
jb 0x417971
lea ecx, [esp + 0xb0]
call fcn.0041a0fe
push dword [esp + 0x2c]
push dword [esp + 0x48]
call dword [0x4813bc]
test ebx, ebx
je 0x4179e9
push ebx
call fcn.00459528
pop ecx
lea ecx, [esp + 0xb0]
call fcn.0041a0e8
mov ecx, dword [esp + 0x3e0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3c8]
xor ecx, esp
call fcn.0045952d
mov esp, ebp
pop ebp
ret 8