Function at 0x5029ec
Capabilities:
Check for software breakpoints

Disassembly:
push ebp
mov ebp, esp
xor ecx, ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push ebx
push esi
push edi
mov ebx, eax
xor eax, eax
push ebp
push 0x502c95
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [ebx + 0x37c], 0
jne 0x502a71
cmp dword [ebx + 0x36c], 0
jle 0x502a71
mov ecx, 0xffffff
mov edx, 0x502cac
mov eax, dword [ebx + 0x32c]
call fcn.004a3730
mov eax, dword [ebx + 0x36c]
mov dword [ebx + 0x37c], eax
mov eax, dword [0x51678c]
mov eax, dword [eax]
call fcn.0045d908
mov dl, 1
mov eax, dword [ebx + 0x378]
call fcn.0050e920
mov dl, 1
mov eax, dword [ebx + 0x34c]
call fcn.0045cf10
mov dl, 1
mov eax, dword [ebx + 0x350]
call fcn.0045cf10
lea edx, [ebp - 0xc]
mov eax, dword [ebx + 0x368]
call fcn.00409a60
mov ecx, dword [ebp - 0xc]
lea eax, [ebp - 8]
mov edx, 0x502cc4
call fcn.00404a5c
mov edx, dword [ebp - 8]
mov eax, dword [ebx + 0x30c]
call fcn.0045d104
mov dl, 1
mov eax, dword [ebx + 0x30c]
call fcn.0045cf10
lea ecx, [ebp - 0x10]
xor edx, edx
mov eax, dword [ebx + 0x360]
call fcn.004ddbf0
mov edx, dword [ebp - 0x10]
mov eax, dword [ebx + 0x370]
call fcn.004e41d8
mov esi, dword [ebx + 0x36c]
test esi, esi
jle 0x502bbf
lea edx, [ebp - 0x14]
mov eax, esi
call fcn.00409a60
mov edx, dword [ebp - 0x14]
mov eax, dword [ebx + 0x330]
call fcn.0045d104
mov eax, dword [ebx + 0x330]
mov eax, dword [eax + 0x68]
mov edx, 0xff
call fcn.0042afdc
mov edx, 0x502ce0
mov eax, dword [ebx + 0x334]
call fcn.0045d104
mov eax, dword [0x51695c]
mov eax, dword [eax]
add eax, 0x20
mov edx, dword [ebx + 8]
call fcn.004047a4
lea edx, [ebp - 0x18]
mov eax, dword [ebx + 0x338]
call fcn.0045d0c4
mov eax, dword [ebp - 0x18]
push eax
lea ecx, [ebp - 0x1c]
mov eax, dword [0x51695c]
mov eax, dword [eax]
mov edx, 0xe
call fcn.0049df2c
mov edx, dword [ebp - 0x1c]
pop eax
call fcn.00404b5c
je 0x502bbf
mov eax, ebx
call fcn.0045c89c
mov edx, dword [ebx + 0x338]
sub eax, dword [edx + 0x40]
mov edx, dword [ebx + 0x32c]
sub eax, dword [edx + 0x40]
push eax
mov eax, dword [0x51695c]
mov eax, dword [eax]
mov ecx, 0xe
mov edx, dword [ebx + 0x338]
call fcn.0049e148
mov eax, ebx
call fcn.0045c89c
mov edx, dword [ebx + 0x338]
sub eax, dword [edx + 0x40]
mov edx, dword [ebx + 0x32c]
sub eax, dword [edx + 0x40]
push eax
mov eax, dword [0x51695c]
mov eax, dword [eax]
mov ecx, 0xf
mov edx, dword [ebx + 0x33c]
call fcn.0049e148
xor edx, edx
mov eax, ebx
call fcn.00503738
mov eax, ebx
call fcn.0045c89c
mov edx, eax
mov eax, dword [ebx + 0x330]
sub edx, dword [eax + 0x48]
mov eax, dword [ebx + 0x32c]
sub edx, dword [eax + 0x40]
mov eax, dword [ebx + 0x330]
call fcn.0045c4c4
mov edx, dword [ebx + 0x330]
mov edx, dword [edx + 0x40]
mov eax, dword [ebx + 0x334]
sub edx, dword [eax + 0x48]
sub edx, 8
call fcn.0045c4c4
mov eax, dword [ebx + 0x360]
call fcn.004ddcb0
mov edx, eax
mov eax, dword [ebx + 0x310]
call fcn.0044d5b4
mov eax, dword [ebx + 0x374]
call fcn.004d8ea8
mov esi, 1
lea eax, [ebp - 4]
mov edx, esi
call fcn.00404d9c
mov eax, dword [ebp - 4]
call fcn.00404a10
mov edi, eax
test edi, edi
jle 0x502c5f
mov esi, 1
mov eax, dword [ebp - 4]
cmp byte [eax + esi - 1], 0xcc
jne 0x502c5b
lea eax, [ebp - 4]
call fcn.00404c68
mov byte [eax + esi - 1], 0x4d
inc esi
dec edi
jne 0x502c44
mov eax, dword [ebx + 0x324]
xor edx, edx
mov dword [eax + 0xc], edx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x502c9c
lea eax, [ebp - 0x1c]
call fcn.00404750
lea eax, [ebp - 0x18]
call fcn.00404750
lea eax, [ebp - 0x14]
mov edx, 5
call fcn.00404774
ret