Function at 0x4045f0
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4605a0
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, dword [0x47908c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, 2
imul ecx, eax, 0
xor edx, edx
mov eax, dword [ebp + 0x30]
mov word [eax + ecx], dx
mov ecx, 1
imul edx, ecx, 0
mov eax, dword [ebp + 0x38]
mov byte [eax + edx], 0
mov ecx, dword [ebp + 0x40]
mov edx, dword [ebp + 0x24]
mov eax, dword [edx]
mov dword [ecx + 8], eax
mov ecx, dword [ebp + 0x40]
mov edx, dword [ebp + 0x24]
mov eax, dword [edx + 4]
mov dword [ecx + 0xc], eax
mov dword [ebp - 0x14], 0
mov ecx, dword [ebp + 0x20]
mov dword [ebp - 0x18], ecx
cmp dword [ebp - 0x18], 3
ja case.default.0x404666
mov edx, dword [ebp - 0x18]
jmp dword [edx*4 + 0x404a1c]
mov eax, dword [ebp + 0x40]
mov ecx, dword [eax + 8]
push ecx
call fcn.00402690
add esp, 4
mov dword [ebp - 0x14], eax
jmp case.default.0x404666
mov edx, dword [ebp + 0x40]
mov eax, dword [edx + 8]
push eax
call fcn.004026b0
add esp, 4
mov dword [ebp - 0x14], eax
jmp case.default.0x404666
mov ecx, dword [ebp + 0x40]
cmp dword [ecx + 8], 0
jl 0x404714
mov edx, 0x29c
test edx, edx
jg 0x4046b6
mov dword [ebp - 0x1c], 0x29c
jmp 0x4046cd
mov eax, 0x29c
and eax, 0xffff
or eax, 0x70000
or eax, 0x80000000
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x1c]
push ecx
mov edx, dword [ebp + 0x1c]
push edx
mov eax, dword [ebp + 0x18]
push eax
mov ecx, dword [ebp + 0x14]
push ecx
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.0041a2f0
add esp, 0x1c
xor edx, edx
jne 0x4046a4
mov eax, dword [ebp + 0x40]
mov dword [eax + 8], 0x8007029c
mov ecx, dword [ebp + 0x40]
mov edx, dword [ecx + 8]
push edx
call fcn.00402970
add esp, 4
mov ecx, dword [ebp + 0x40]
mov dword [ecx + 0xc], eax
mov edx, dword [ebp + 0x40]
mov eax, dword [edx + 8]
push eax
call fcn.004026d0
add esp, 4
mov dword [ebp - 0x14], eax
jmp case.default.0x404666
mov ecx, dword [ebp + 0x40]
mov edx, dword [ecx + 8]
push edx
call fcn.004026f0
add esp, 4
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0x40]
mov ecx, dword [ebp + 0x20]
mov dword [eax], ecx
mov edx, dword [ebp + 0x40]
mov dword [edx + 4], 0
mov eax, dword [ebp + 0x24]
mov cl, byte [eax + 8]
mov byte [ebp - 0x10], cl
movzx edx, byte [ebp - 0x10]
test edx, edx
je 0x404773
mov eax, dword [ebp + 0x40]
add eax, 4
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx]
or edx, 8
mov eax, dword [ebp - 0x20]
mov dword [eax], edx
xor ecx, ecx
jne 0x40474c
mov edx, 1
lock xadd dword [0x47d870], edx
inc edx
mov eax, dword [ebp + 0x40]
mov dword [eax + 0x10], edx
cmp dword [ebp + 0x28], 0
je 0x4047ac
mov ecx, 2
imul edx, ecx, 0
mov eax, dword [ebp + 0x28]
movzx ecx, word [eax + edx]
test ecx, ecx
je 0x4047ac
mov edx, dword [ebp + 0x28]
mov dword [ebp - 0x24], edx
jmp 0x4047b3
mov dword [ebp - 0x24], 0
mov eax, dword [ebp + 0x40]
mov ecx, dword [ebp - 0x24]
mov dword [eax + 0x14], ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edx, dword [ebp + 0x40]
mov dword [edx + 0x18], eax
mov eax, dword [ebp + 0x40]
mov ecx, dword [ebp + 0x10]
mov dword [eax + 0x24], ecx
mov edx, dword [ebp + 0x40]
mov eax, dword [ebp + 0xc]
mov dword [edx + 0x28], eax
mov ecx, dword [ebp + 0x40]
mov edx, dword [ebp - 0x14]
mov dword [ecx + 0x2c], edx
mov eax, dword [ebp + 0x40]
mov ecx, dword [ebp + 0x18]
mov dword [eax + 0x1c], ecx
mov edx, dword [ebp + 0x40]
mov eax, dword [ebp + 0x14]
mov dword [edx + 0x20], eax
mov ecx, dword [ebp + 0x40]
mov edx, dword [ebp + 0x1c]
mov dword [ecx + 0x50], edx
mov eax, dword [ebp + 0x40]
mov ecx, dword [ebp + 8]
mov dword [eax + 0x54], ecx
mov edx, dword [ebp + 0x40]
mov dword [edx + 0x30], 0
xor eax, eax
mov ecx, dword [ebp + 0x40]
add ecx, 0x40
mov dword [ecx], eax
mov dword [ecx + 4], eax
mov dword [ecx + 8], eax
xor edx, edx
mov eax, dword [ebp + 0x40]
add eax, 0x34
mov dword [eax], edx
mov dword [eax + 4], edx
mov dword [eax + 8], edx
cmp dword [0x47d6d8], 0
je 0x404845
call dword [0x47d6d8]
mov dword [ebp - 0x28], eax
jmp 0x40484c
mov dword [ebp - 0x28], 0
mov ecx, dword [ebp + 0x40]
mov edx, dword [ebp - 0x28]
mov dword [ecx + 0x4c], edx
cmp dword [0x47d688], 0
je 0x40486d
mov eax, dword [0x47d688]
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp + 0x40]
push ecx
call dword [ebp - 0x2c]
cmp dword [0x47d6a8], 0
je 0x40488e
mov edx, dword [0x47d6a8]
mov dword [ebp - 0x30], edx
mov eax, dword [ebp + 0x3c]
push eax
mov ecx, dword [ebp + 0x38]
push ecx
mov edx, dword [ebp + 0x40]
push edx
call dword [ebp - 0x30]
cmp dword [0x47d6a0], 0
je 0x4048a6
mov eax, dword [0x47d6a0]
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp + 0x40]
push ecx
call dword [ebp - 0x34]
cmp dword [0x47d6bc], 0
je 0x4048d2
movzx edx, byte [ebp + 0x2c]
test edx, edx
jne 0x4048d2
mov eax, dword [ebp + 0x40]
mov ecx, dword [eax + 4]
and ecx, 2
jne 0x4048d2
mov edx, dword [0x47d6bc]
mov dword [ebp - 0x38], edx
mov eax, dword [ebp + 0x40]
push eax
call dword [ebp - 0x38]
mov ecx, dword [ebp + 0x40]
cmp dword [ecx + 8], 0
jl 0x404917
cmp dword [ebp + 0x20], 3
je 0x4048e7
mov byte [ebp - 0xd], 1
jmp 0x4048eb
mov byte [ebp - 0xd], 0
movzx edx, byte [ebp - 0xd]
test edx, edx
je 0x4048f8
call fcn.00404df0
mov eax, dword [ebp + 0x40]
mov dword [eax + 8], 0x8000ffff
mov ecx, dword [ebp + 0x40]
mov edx, dword [ecx + 8]
push edx
call fcn.00402970
add esp, 4
mov ecx, dword [ebp + 0x40]
mov dword [ecx + 0xc], eax
call fcn.00404580
movzx edx, al
test edx, edx
je 0x40493f
movzx eax, byte [0x479ae0]
test eax, eax
je 0x40493f
mov ecx, dword [ebp + 0x40]
mov edx, dword [ecx + 4]
and edx, 2
jne 0x40493f
mov byte [ebp - 0xe], 1
jmp 0x404943
mov byte [ebp - 0xe], 0
mov al, byte [ebp - 0xe]
mov byte [ebp - 0xf], al
movzx ecx, byte [ebp + 0x2c]
test ecx, ecx
jne 0x404959
movzx edx, byte [ebp - 0xf]
test edx, edx
je 0x4049c0
cmp dword [0x47d678], 0
je 0x404985
movzx eax, byte [0x47d690]
test eax, eax
jne 0x404985
mov ecx, dword [0x47d678]
mov dword [ebp - 0x3c], ecx
mov edx, dword [ebp + 0x34]
push edx
mov eax, dword [ebp + 0x30]
push eax
mov ecx, dword [ebp + 0x40]
push ecx
call dword [ebp - 0x3c]
mov edx, 2
imul eax, edx, 0
mov ecx, dword [ebp + 0x30]
movzx edx, word [ecx + eax]
test edx, edx
jne 0x4049ac
mov eax, dword [ebp + 0x40]
push eax
mov ecx, dword [ebp + 0x34]
push ecx
mov edx, dword [ebp + 0x30]
push edx
call fcn.00402040
add esp, 0xc
movzx eax, byte [ebp - 0xf]
test eax, eax
je 0x4049be
mov ecx, dword [ebp + 0x30]
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x4049e7
cmp dword [0x47d678], 0
je 0x4049e7
movzx edx, byte [0x47d690]
test edx, edx
jne 0x4049e7
mov eax, dword [0x47d678]
mov dword [ebp - 0x40], eax
push 0
push 0
mov ecx, dword [ebp + 0x40]
push ecx
call dword [ebp - 0x40]
mov edx, dword [ebp + 0x40]
mov eax, dword [edx + 4]
and eax, 4
jne 0x4049fd
movzx ecx, byte [0x47d67c]
test ecx, ecx
je 0x404a0c
cmp dword [0x47d6b0], 0
je 0x404a0c
call dword [0x47d6b0]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov esp, ebp
pop ebp
ret