Function at 0x5021a0
Capabilities:
Print debug messages

Disassembly:
sub esp, 0x508
push ebp
push esi
mov esi, ecx
push edi
xor ebp, ebp
mov edi, dword [esi + 0xb2c]
cmp edi, ebp
je 0x502533
push ebx
mov eax, dword [edi]
cmp eax, ebp
je 0x502525
mov ecx, dword [eax + 0x1c]
mov edx, dword [esi + 0xaf8]
cmp ecx, edx
ja 0x50233a
cmp dword [eax + 8], ebp
jne 0x50233a
mov ebx, dword [eax + 4]
sub ebx, ebp
je 0x5022e2
dec ebx
je 0x5022a5
dec ebx
je 0x502201
mov dword [eax + 8], 2
jmp 0x50233a
mov eax, dword [eax]
push edx
push ecx
push eax
lea ecx, [esp + 0x20]
push str._d_s_snd__d___d__n
push ecx
call fcn.005faef4
add esp, 0x14
lea edx, [esp + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [0x6633d4]
mov ecx, dword [edi]
mov ebx, dword [eax + 0x94]
cmp ebx, ebp
je 0x502299
mov edx, dword [ecx + 0x28]
lea eax, [esp + 0x414]
push edx
push str.campaign_s
push eax
call fcn.005faef4
add esp, 0xc
lea ecx, [esp + 0x414]
push 6
push ebp
push ebp
push ecx
mov ecx, ebx
call fcn.005217c0
cmp eax, 0xffffffff
je 0x50228b
mov edx, dword [edi]
push eax
mov dword [edx + 8], 2
mov ecx, dword [edi]
mov dword [ecx + 0x30], eax
mov ecx, ebx
call fcn.00521d20
call dword [sym.imp.WINMM.dll_timeGetTime]
mov edx, dword [edi]
mov dword [edx + 0x38], eax
jmp 0x50233a
mov eax, dword [edi]
mov dword [eax + 8], 4
jmp 0x50233a
mov dword [ecx + 8], 4
jmp 0x50233a
mov dword [eax + 0x34], ebp
mov edx, dword [edi]
mov ebx, 1
mov dword [edx + 8], ebx
mov eax, dword [edi]
mov ecx, dword [eax + 0x24]
mov edx, dword [eax + 0x10]
push ecx
mov ecx, dword [eax + 0xc]
push edx
mov edx, dword [esi + 0xaf8]
push ecx
mov ecx, dword [eax + 0x1c]
push edx
mov edx, dword [eax]
push ecx
push edx
lea eax, [esp + 0x2c]
push str._d_s_pic__d___d____d__d_f_d_n
push eax
call fcn.005faef4
add esp, 0x20
jmp 0x502319
mov ebx, 1
mov dword [eax + 8], ebx
mov ecx, dword [edi]
mov dword [ecx + 0x34], ebp
mov eax, dword [edi]
mov edx, dword [eax + 0x10]
mov ecx, dword [eax + 0xc]
push edx
mov edx, dword [esi + 0xaf8]
push ecx
mov ecx, dword [eax + 0x1c]
push edx
mov edx, dword [eax]
push ecx
push edx
lea eax, [esp + 0x28]
push str._d_s_txt__d___d____d__d_n
push eax
call fcn.005faef4
add esp, 0x1c
lea ecx, [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov ebp, dword [esi + 0xb70]
mov edx, dword [esi]
xor eax, eax
cmp ebp, ebx
setle al
inc eax
mov ecx, esi
push eax
call dword [edx + 0x20]
mov eax, dword [edi]
mov ecx, 2
cmp dword [eax + 4], ecx
jne 0x5023a2
cmp dword [eax + 8], ecx
jne 0x5023a2
call dword [sym.imp.WINMM.dll_timeGetTime]
mov ecx, eax
mov eax, dword [edi]
mov dword [esp + 0x10], ecx
sub ecx, dword [eax + 0x38]
cmp ecx, 0x3e8
jb 0x5023a2
mov ecx, dword [0x6633d4]
mov ebp, dword [ecx + 0x94]
test ebp, ebp
je 0x502399
mov ebx, dword [eax + 0x30]
cmp ebx, 0xffffffff
je 0x502399
push ebx
mov ecx, ebp
call fcn.00521f20
test eax, eax
jne 0x502399
mov edx, dword [edi]
push ebx
mov ecx, ebp
mov dword [edx + 8], 4
call fcn.00521ba0
mov eax, dword [edi]
mov ecx, dword [esp + 0x10]
mov dword [eax + 0x38], ecx
mov eax, dword [edi]
mov ecx, dword [esi + 0xaf8]
mov ebx, dword [eax + 0x20]
mov edx, dword [eax + 0x1c]
add ebx, edx
cmp ebx, ecx
ja 0x5024a1
mov ecx, dword [eax + 8]
cmp ecx, 2
je 0x5023cb
cmp ecx, 1
jne 0x5024a1
mov ecx, dword [eax + 4]
sub ecx, 0
je 0x502448
dec ecx
je 0x5023e9
dec ecx
je 0x5024a1
mov dword [eax + 8], 4
jmp 0x5024a1
mov dword [eax + 8], 3
mov edx, dword [edi]
mov dword [edx + 0x34], 0x64
mov eax, dword [edi]
mov ecx, dword [eax + 0x24]
mov edx, dword [eax + 0x10]
push ecx
mov ecx, dword [eax + 0xc]
mov eax, dword [eax]
push edx
mov edx, dword [esi + 0xaf8]
push ecx
push edx
push ebx
push eax
lea ecx, [esp + 0x2c]
push str._d_e_pic__d___d____d__d_f_d_n
push ecx
call fcn.005faef4
add esp, 0x20
lea edx, [esp + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov edx, dword [esi + 0xb70]
mov eax, dword [esi]
xor ecx, ecx
cmp edx, 1
setle cl
inc ecx
push ecx
mov ecx, esi
call dword [eax + 0x20]
jmp 0x5024a1
mov dword [eax + 8], 3
mov edx, dword [edi]
mov dword [edx + 0x34], 0x64
mov eax, dword [edi]
mov ecx, dword [eax + 0x10]
mov edx, dword [eax + 0xc]
push ecx
mov ecx, dword [esi + 0xaf8]
push edx
mov edx, dword [eax]
push ecx
push ebx
push edx
lea eax, [esp + 0x28]
push str._d_e_txt__d___d____d__d_n
push eax
call fcn.005faef4
add esp, 0x1c
lea ecx, [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov ecx, dword [esi + 0xb70]
mov edx, dword [esi]
xor eax, eax
cmp ecx, 1
setle al
inc eax
mov ecx, esi
push eax
call dword [edx + 0x20]
mov ecx, dword [edi]
cmp dword [ecx + 8], 1
jne 0x5024de
mov ebp, dword [ecx + 0x34]
test ebp, ebp
jle 0x5024de
mov eax, dword [esi + 0xaf8]
mov edx, dword [ecx + 0x1c]
sub eax, edx
lea eax, [eax + eax*4]
shl eax, 1
cdq
idiv dword [esi + 0xb70]
lea edx, [eax + eax*4]
lea eax, [edx + edx + 1]
cmp eax, ebp
je 0x5024de
mov dword [ecx + 0x34], eax
mov eax, dword [esi]
push 1
mov ecx, esi
call dword [eax + 0x20]
mov ebp, dword [edi]
cmp dword [ebp + 8], 3
jne 0x502525
cmp dword [ebp + 0x34], 0x64
jge 0x502525
mov ecx, dword [esi + 0xaf8]
sub ecx, ebx
mov ebx, dword [esi + 0xb70]
lea eax, [ecx + ecx*4]
shl eax, 1
cdq
idiv ebx
lea edx, [eax + eax*4]
mov eax, 0x63
shl edx, 1
sub eax, edx
cmp ecx, ebx
jl 0x502514
xor eax, eax
cmp eax, dword [ebp + 0x34]
je 0x502525
mov dword [ebp + 0x34], eax
mov eax, dword [esi]
push 1
mov ecx, esi
call dword [eax + 0x20]
mov edi, dword [edi + 4]
xor ebp, ebp
cmp edi, ebp
jne 0x5021bc
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x508
ret