Function at 0x51c700
Capabilities:
Check for software breakpoints

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe8
push ebx
push esi
xor ebx, ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0xc], ebx
mov ebx, ecx
add ebx, ebx
inc ebx
test ebx, ebx
js 0x51c723
shr ebx, 2
mov esi, dword [edx + ebx*4]
dec ebx
push esi
jns 0x51c71c
mov edx, esp
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x10], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x51ca39
push dword fs:[eax]
mov dword fs:[eax], esp
push ebp
call fcn.0051c6b4
pop ecx
test al, al
jne 0x51c75b
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x10]
mov byte [eax + 0x9c], 0
mov bl, 1
jmp 0x51ca1e
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x10]
call fcn.0051c000
mov ebx, eax
mov eax, ebx
mov ecx, 0x64
cdq
idiv ecx
mov esi, eax
mov byte [ebp - 0x15], 0
cmp esi, 3
jne 0x51c785
cmp ebx, 0x130
jne 0x51c7a1
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x10]
cmp dword [eax + 0x7c], 0
je 0x51c891
cmp ebx, 0xc9
je 0x51c891
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
add dword [eax + 0x138], 1
jno 0x51c7b5
call fcn.00404ccc
lea eax, [ebp - 8]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0x10]
mov edx, dword [edx + 0x7c]
call fcn.00406e30
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 4]
mov edx, dword [edx + 0xc]
mov edx, dword [edx + 0xc0]
call fcn.00406e30
mov eax, dword [ebp - 4]
mov esi, dword [eax + 4]
mov eax, dword [esi + 0x138]
push eax
lea ecx, [ebp - 0xc]
lea edx, [ebp - 8]
mov eax, esi
mov esi, dword [eax]
call dword [esi + 0xb4]
test al, al
jne 0x51c813
push ebp
push 0xffffffffffffffff
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
mov eax, ebx
call fcn.0051c4a8
pop ecx
mov bl, 1
jmp 0x51ca1e
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
cmp byte [eax + 0x140], 0
je 0x51c85a
mov edx, dword [eax + 0x138]
cmp edx, dword [eax + 0x13c]
jge 0x51c85a
xor ebx, ebx
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xc]
add eax, 0xbc
mov edx, dword [ebp - 8]
call fcn.00406ddc
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xc]
add eax, 0xc0
mov edx, dword [ebp - 0xc]
call fcn.00406ddc
jmp 0x51c86d
mov bl, 1
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x10]
add eax, 0x7c
mov edx, dword [ebp - 8]
call fcn.00406ddc
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
mov edx, dword [eax]
call dword [edx + 0x68]
test al, al
je 0x51ca1e
push ebp
mov eax, 0x1388
call fcn.0051c644
pop ecx
jmp 0x51ca1e
cmp esi, 2
je 0x51c9c6
mov eax, ebx
sub eax, 0x191
je 0x51c8ad
sub eax, 6
je 0x51c920
jmp 0x51c993
mov eax, dword [ebp - 4]
mov esi, dword [eax + 4]
mov eax, dword [esi + 0x110]
cmp eax, dword [esi + 0x124]
jge 0x51c8db
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x10]
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0xc]
mov eax, esi
mov esi, dword [eax]
call dword [esi + 0xac]
test al, al
jne 0x51c908
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0xb0]
test eax, eax
je 0x51c8f0
mov edx, dword [eax]
call dword [edx + 0x20]
push ebp
push 0xffffffffffffffff
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
mov eax, ebx
call fcn.0051c4a8
pop ecx
mov bl, 1
jmp 0x51ca1e
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
test byte [eax + 0x141], 1
setne al
mov byte [ebp - 0x15], al
jmp 0x51c9c6
mov eax, dword [ebp - 4]
mov esi, dword [eax + 4]
mov eax, dword [esi + 0x114]
cmp eax, dword [esi + 0x124]
jge 0x51c94e
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x10]
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0xc]
mov eax, esi
mov esi, dword [eax]
call dword [esi + 0xb0]
test al, al
jne 0x51c97e
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
mov eax, dword [eax + 0x14c]
mov eax, dword [eax + 4]
test eax, eax
je 0x51c966
mov edx, dword [eax]
call dword [edx + 0x20]
push ebp
push 0xffffffffffffffff
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
mov eax, ebx
call fcn.0051c4a8
pop ecx
mov bl, 1
jmp 0x51ca1e
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
test byte [eax + 0x141], 1
setne al
mov byte [ebp - 0x15], al
jmp 0x51c9c6
dec esi
je 0x51c99e
cmp ebx, 0x130
jne 0x51c9b1
push ebp
push 0x64
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
mov eax, ebx
call fcn.0051c4a8
pop ecx
jmp 0x51c9c2
push ebp
push 0xffffffffffffffff
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
mov eax, ebx
call fcn.0051c4a8
pop ecx
mov bl, 1
jmp 0x51ca1e
cmp byte [ebp - 0x15], 0
je 0x51c9da
push ebp
or eax, 0xffffffff
call fcn.0051c644
pop ecx
mov bl, 4
jmp 0x51ca1e
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0xc0]
mov edx, 0x51ca58
call fcn.004074c4
je 0x51c9fa
cmp ebx, 0xcc
jne 0x51ca08
push ebp
mov eax, 0x64
call fcn.0051c644
pop ecx
jmp 0x51ca1c
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x10]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
or ecx, 0xffffffff
call fcn.0051a17c
mov bl, 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51ca40
lea eax, [ebp - 0xc]
mov edx, 2
call fcn.00406dd4
ret