Function at 0x454885
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff004
push eax
add esp, 0xfffffdc0
push esi
push edi
mov esi, 0x463bb0
lea edi, [ebp - 0x13c]
mov ecx, 0x40
rep movsd dword es:[edi], dword [esi]
mov esi, 0x463cb0
lea edi, [ebp - 0x14c]
mov ecx, 4
rep movsd dword es:[edi], dword [esi]
xor eax, eax
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], 2
push 0x465863
call sub.kernel32.dll_OutputDebugStringA
test byte [ebp + 0x20], 2
je 0x4548de
mov dword [ebp - 0xc], 4
test byte [ebp + 0x20], 4
je 0x4548eb
mov dword [ebp - 0xc], 8
mov eax, dword [ebp + 0x18]
cdq
idiv dword [ebp - 0xc]
test edx, edx
jne 0x454905
mov ecx, dword [ebp + 0x18]
sar ecx, 1
jns 0x454900
adc ecx, 0
mov dword [ebp - 0x10], ecx
jmp 0x45491a
mov eax, dword [ebp + 0x18]
cdq
idiv dword [ebp - 0xc]
inc eax
imul dword [ebp - 0xc]
sar eax, 1
jns 0x454917
adc eax, 0
mov dword [ebp - 0x10], eax
lea ecx, [ebp - 0x18]
push ecx
push dword [ebp + 8]
call fcn.0045395a
movzx eax, word [ebp + 0x10]
add eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x18]
jbe 0x45494a
push 0x465884
call sub.kernel32.dll_OutputDebugStringA
push 6
call sub.kernel32.dll_SetLastError
xor eax, eax
jmp 0x454bc1
cmp dword [ebp + 0x1c], 0
je 0x454981
push dword [ebp + 0x1c]
call fcn.004519c2
pop ecx
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0x100
jle 0x45496c
mov dword [ebp - 8], 0xff
push dword [ebp - 8]
push dword [ebp + 0x1c]
lea edx, [ebp - 0x13c]
push edx
call fcn.0045197a
add esp, 0xc
cmp dword [ebp - 8], 0x10
jge 0x45498e
mov dword [ebp - 8], 0x10
push 0x10
push 0x4658a9
lea ecx, [ebp - 0x13c]
push ecx
call fcn.00454854
add esp, 0xc
test byte [ebp + 0x23], 0x80
je 0x4549e8
push 0x10
lea eax, [ebp - 0x14c]
push eax
push dword [ebp + 8]
call fcn.00453722
test eax, eax
jne 0x4549d0
push 0x4658b9
call sub.kernel32.dll_OutputDebugStringA
xor eax, eax
jmp 0x454bc1
push 0x10
lea edx, [ebp - 0x14c]
push edx
lea ecx, [ebp - 0x13c]
push ecx
call fcn.00454854
add esp, 0xc
mov eax, dword [ebp - 0x10]
add eax, eax
push eax
call fcn.004519ff
pop ecx
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x454a0e
push 0x4658d3
call sub.kernel32.dll_OutputDebugStringA
xor eax, eax
jmp 0x454bc1
mov edx, dword [ebp - 0x10]
add edx, edx
push edx
push 0
push dword [ebp - 0x14]
call fcn.0045199e
add esp, 0xc
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp - 0x14]
call fcn.0045197a
add esp, 0xc
mov ecx, dword [ebp - 0xc]
sub ecx, 2
je 0x454a4d
sub ecx, 2
je 0x454ab3
sub ecx, 4
je 0x454b1e
jmp 0x454b89
push dword [ebp - 8]
lea eax, [ebp - 0x13c]
push eax
lea edx, [ebp - 0x164]
push edx
call fcn.004585c9
add esp, 0xc
xor ecx, ecx
mov dword [ebp - 0x24], ecx
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0x10]
jge 0x454b89
mov edx, dword [ebp - 0x24]
add edx, edx
add edx, dword [ebp - 0x14]
mov dword [ebp - 0x1c], edx
mov ecx, dword [ebp - 0x24]
add ecx, ecx
add ecx, dword [ebp - 0x14]
inc ecx
mov dword [ebp - 0x20], ecx
push dword [ebp - 0x20]
push dword [ebp - 0x1c]
lea eax, [ebp - 0x164]
push eax
call fcn.004584aa
add esp, 0xc
inc dword [ebp - 0x24]
mov edx, dword [ebp - 0x24]
cmp edx, dword [ebp - 0x10]
jl 0x454a77
jmp 0x454b89
push dword [ebp - 8]
lea ecx, [ebp - 0x13c]
push ecx
lea eax, [ebp - 0x1f8]
push eax
call fcn.004588c6
add esp, 0xc
xor edx, edx
mov dword [ebp - 0x30], edx
jmp 0x454b08
mov ecx, dword [ebp - 0x30]
add ecx, ecx
add ecx, ecx
add ecx, dword [ebp - 0x14]
mov dword [ebp - 0x28], ecx
mov eax, dword [ebp - 0x30]
add eax, eax
add eax, eax
add eax, dword [ebp - 0x14]
add eax, 2
mov dword [ebp - 0x2c], eax
push dword [ebp - 0x2c]
push dword [ebp - 0x28]
lea edx, [ebp - 0x1f8]
push edx
call fcn.0045876f
add esp, 0xc
inc dword [ebp - 0x30]
mov ecx, dword [ebp - 0x10]
add ecx, ecx
test ecx, ecx
jns 0x454b14
add ecx, 3
sar ecx, 2
cmp ecx, dword [ebp - 0x30]
jg 0x454ad3
jmp 0x454b89
push dword [ebp - 8]
lea eax, [ebp - 0x13c]
push eax
lea edx, [ebp - 0x1240]
push edx
call fcn.004582e2
add esp, 0xc
xor ecx, ecx
mov dword [ebp - 0x3c], ecx
jmp 0x454b75
mov eax, dword [ebp - 0x3c]
add eax, eax
shl eax, 2
add eax, dword [ebp - 0x14]
mov dword [ebp - 0x34], eax
mov edx, dword [ebp - 0x3c]
add edx, edx
shl edx, 2
add edx, dword [ebp - 0x14]
add edx, 4
mov dword [ebp - 0x38], edx
push dword [ebp - 0x38]
push dword [ebp - 0x34]
lea ecx, [ebp - 0x1240]
push ecx
call fcn.004581c5
add esp, 0xc
inc dword [ebp - 0x3c]
mov eax, dword [ebp - 0x10]
add eax, eax
test eax, eax
jns 0x454b81
add eax, 7
sar eax, 3
cmp eax, dword [ebp - 0x3c]
jg 0x454b3e
mov edx, dword [ebp - 0x10]
add edx, edx
push edx
push dword [ebp - 0x14]
movzx ecx, word [ebp + 0x10]
push ecx
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00454017
mov dword [ebp - 4], eax
push dword [ebp - 0x14]
call fcn.00451a1b
pop ecx
cmp dword [ebp - 4], 0
jne 0x454bbe
push 0x4658ed
call sub.kernel32.dll_OutputDebugStringA
mov eax, dword [ebp - 4]
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0x1c