Function at 0x50a544
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push ebx
push esi
push edi
mov dword [ebp - 8], ecx
mov dword [ebp - 4], edx
mov ebx, eax
mov edi, dword [ebp + 0x10]
mov esi, dword [ebp + 0x14]
xor eax, eax
push ebp
push 0x50a7f0
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
mov dword [ebx + 0x14], eax
mov eax, dword [ebp - 8]
mov dword [ebx + 0x18], eax
mov dword [ebx + 0x1c], esi
mov dword [ebx + 0x20], edi
mov ecx, dword [0x586a10]
mov ecx, dword [ecx]
sub ecx, 0x24
mov eax, dword [ecx]
mov dword [ebx + 0xc], eax
lea eax, [ecx + 4]
mov eax, dword [eax]
mov dword [ebx + 8], eax
cmp dword [ebx + 0x34], 0
jne 0x50a63f
mov dword [ebx + 0x34], 2
cmp dword [ebx + 0xc], 0
jle 0x50a63f
cmp dword [ebx + 8], 0
jle 0x50a63f
mov eax, ecx
sub eax, 0x34
mov eax, dword [eax]
xor edx, edx
push edx
push eax
mov eax, dword [ebx + 0xc]
cdq
cmp edx, dword [esp + 4]
jne 0x50a5d9
cmp eax, dword [esp]
pop edx
pop eax
je 0x50a5f7
sub ecx, 0x30
mov eax, dword [ecx]
xor edx, edx
push edx
push eax
mov eax, dword [ebx + 0xc]
cdq
cmp edx, dword [esp + 4]
jne 0x50a5f3
cmp eax, dword [esp]
pop edx
pop eax
jne 0x50a63f
push 0x50a808
lea edx, [ebp - 0x10]
mov eax, dword [ebx + 0xc]
call fcn.00409fe0
push dword [ebp - 0x10]
push 0x50a820
lea edx, [ebp - 0x14]
mov eax, dword [ebx + 8]
call fcn.00409fe0
push dword [ebp - 0x14]
lea eax, [ebp - 0xc]
mov edx, 4
call fcn.0040553c
mov eax, dword [ebp - 0xc]
call fcn.00405638
push eax
call sub.kernel32.dll_OutputDebugStringA
mov dword [ebx + 0x34], 1
cmp dword [ebx + 0x34], 2
jne 0x50a723
mov eax, dword [0x586a10]
mov eax, dword [eax]
movzx eax, word [eax]
cmp eax, 1
jne 0x50a668
mov dword [ebx + 0xc], 0x9c4
mov dword [ebx + 8], 0x640
jmp 0x50a6e2
cmp eax, 0x190
jne 0x50a67f
mov dword [ebx + 0xc], 0x401
mov dword [ebx + 8], 0x460
jmp 0x50a6e2
cmp eax, 0x12c
jne 0x50a696
mov dword [ebx + 0xc], 0x12c
mov dword [ebx + 8], 0x354
jmp 0x50a6e2
cmp esi, dword [ebp - 4]
jge 0x50a6a6
mov eax, dword [ebp - 4]
add eax, 0x50
mov dword [ebx + 0xc], eax
jmp 0x50a6ac
lea eax, [esi + 0x50]
mov dword [ebx + 0xc], eax
cmp edi, dword [ebp - 8]
jge 0x50a6bc
mov eax, dword [ebp - 8]
add eax, 0x50
mov dword [ebx + 8], eax
jmp 0x50a6c2
lea eax, [edi + 0x50]
mov dword [ebx + 8], eax
cmp dword [ebx + 0xc], 0x9c4
jle 0x50a6d2
mov dword [ebx + 0xc], 0x9c4
cmp dword [ebx + 8], 0x640
jle 0x50a6e2
mov dword [ebx + 8], 0x640
push 0x50a82c
lea edx, [ebp - 0x1c]
mov eax, dword [ebx + 0xc]
call fcn.00409fe0
push dword [ebp - 0x1c]
push 0x50a820
lea edx, [ebp - 0x20]
mov eax, dword [ebx + 8]
call fcn.00409fe0
push dword [ebp - 0x20]
lea eax, [ebp - 0x18]
mov edx, 4
call fcn.0040553c
mov eax, dword [ebp - 0x18]
call fcn.00405638
push eax
call sub.kernel32.dll_OutputDebugStringA
cmp dword [ebp + 0xc], 0
jle 0x50a7a1
mov eax, dword [ebp + 0xc]
cmp esi, dword [ebp - 4]
jle 0x50a741
mov edx, dword [ebp - 4]
sub edx, eax
mov dword [ebx + 0x24], edx
lea edx, [eax + esi]
mov dword [ebx + 0x28], edx
jmp 0x50a750
mov edx, dword [ebp - 4]
add edx, eax
mov dword [ebx + 0x28], edx
mov edx, esi
sub edx, eax
mov dword [ebx + 0x24], edx
cmp edi, dword [ebp - 8]
jle 0x50a764
mov edx, dword [ebp - 8]
sub edx, eax
mov dword [ebx + 0x2c], edx
add eax, edi
mov dword [ebx + 0x30], eax
jmp 0x50a773
mov edx, dword [ebp - 8]
add edx, eax
mov dword [ebx + 0x30], edx
mov edx, edi
sub edx, eax
mov dword [ebx + 0x2c], edx
cmp dword [ebx + 0x24], 0
jge 0x50a77e
xor eax, eax
mov dword [ebx + 0x24], eax
mov eax, dword [ebx + 0xc]
cmp eax, dword [ebx + 0x28]
jge 0x50a789
mov dword [ebx + 0x28], eax
cmp dword [ebx + 0x2c], 0
jge 0x50a794
xor eax, eax
mov dword [ebx + 0x2c], eax
mov eax, dword [ebx + 8]
cmp eax, dword [ebx + 0x30]
jge 0x50a7b7
mov dword [ebx + 0x30], eax
jmp 0x50a7b7
xor eax, eax
mov dword [ebx + 0x24], eax
xor eax, eax
mov dword [ebx + 0x2c], eax
mov eax, dword [ebx + 0xc]
mov dword [ebx + 0x28], eax
mov eax, dword [ebx + 8]
mov dword [ebx + 0x30], eax
push esi
push edi
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 4]
mov eax, ebx
call fcn.0050a358
mov eax, dword [ebp + 8]
push eax
mov ecx, edi
mov edx, esi
mov eax, ebx
call fcn.0050a104
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x50a7f7
lea eax, [ebp - 0x20]
mov edx, 6
call fcn.004051cc
ret