Function at 0x5139cb
Capabilities:
Check for software breakpoints

Disassembly:
sub esp, 0x48
push ebx
xor ebx, ebx
push ebp
mov ebp, dword [esp + 0x54]
push esi
push edi
mov byte [esp + 0x2c], 0xe8
mov dword [esp + 0x2d], ebx
mov byte [esp + 0x24], 0xe9
mov dword [esp + 0x25], ebx
mov byte [esp + 0x34], 0xf
mov byte [esp + 0x35], 0x80
mov dword [esp + 0x36], ebx
mov byte [esp + 0x5c], bl
mov byte [esp + 0x12], bl
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebx
mov dword [ebp + 0xc], ebx
mov dword [ebp + 0x10], ebx
movzx edi, byte [esp + 0x5c]
movzx eax, byte [esp + 0x12]
add edi, dword [ebp]
mov esi, dword [ebp + 8]
push edi
lea edx, [esp + 0x40]
mov dword [esp + 0x24], eax
add esi, eax
call fcn.00513ae0
add esp, 4
test dword [esp + 0x54], 0x1000
jne 0x513acf
cmp byte [esp + 0x5c], 5
mov dword [esp + 0x1c], edi
jb 0x513891
mov eax, edi
sub eax, esi
sub eax, 5
mov ebx, 1
mov dword [esp + 0x25], eax
lea ecx, [esp + 0x24]
mov eax, 5
mov dword [esp + 0x18], ebx
jmp 0x5139dc
mov dl, byte [esp + 0x42]
cmp dl, 0xe8
jne 0x5138bb
movzx edx, byte [esp + 0x3c]
sub edx, esi
add edx, dword [esp + 0x4c]
lea ecx, [esp + 0x2c]
lea eax, [edx + edi - 5]
mov dword [esp + 0x2d], eax
mov eax, 5
jmp 0x5139dc
mov cl, dl
and cl, 0xfd
cmp cl, 0xe9
jne 0x513925
movzx ecx, byte [esp + 0x3c]
add ecx, edi
cmp dl, 0xeb
jne 0x5138da
movsx edx, byte [esp + 0x4c]
add ecx, edx
jmp 0x5138de
add ecx, dword [esp + 0x4c]
mov edx, dword [ebp]
cmp edx, ecx
ja 0x5138ff
add edx, 5
cmp ecx, edx
jae 0x5138ff
cmp dword [esp + 0x14], ecx
jae 0x5139e0
mov dword [esp + 0x14], ecx
jmp 0x5139e0
sub ecx, esi
sub ecx, 5
cmp edi, dword [esp + 0x14]
lea eax, [esp + 0x24]
sbb ebx, ebx
inc ebx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x25], ecx
mov eax, 5
mov dword [esp + 0x18], ebx
jmp 0x5139e0
mov cl, dl
and cl, 0xf0
mov byte [esp + 0x13], cl
cmp cl, 0x70
je 0x513962
mov cl, dl
and cl, 0xfc
cmp cl, 0xe0
je 0x513962
mov cl, byte [esp + 0x43]
and cl, 0xf0
cmp cl, 0x80
je 0x513962
and dl, 0xfe
cmp dl, 0xc2
jne 0x5139e0
cmp edi, dword [esp + 0x14]
sbb ebx, ebx
inc ebx
mov dword [esp + 0x18], ebx
jmp 0x5139e0
movzx ecx, byte [esp + 0x3c]
add ecx, edi
cmp byte [esp + 0x13], 0x70
je 0x513980
mov bl, dl
and bl, 0xfc
cmp bl, 0xe0
je 0x513980
add ecx, dword [esp + 0x4c]
jmp 0x513987
movsx ebx, byte [esp + 0x4c]
add ecx, ebx
mov ebx, dword [ebp]
cmp ebx, ecx
ja 0x5139a5
add ebx, 5
cmp ecx, ebx
jae 0x5139a5
mov ebx, dword [esp + 0x18]
cmp dword [esp + 0x14], ecx
jae 0x5139e0
mov dword [esp + 0x14], ecx
jmp 0x5139e0
mov al, dl
and al, 0xfc
cmp al, 0xe0
je 0x513acf
movzx eax, dl
cmp dl, 0xf
jne 0x5139be
movzx eax, byte [esp + 0x43]
mov ebx, dword [esp + 0x18]
and al, 0xf
or al, 0x80
sub ecx, esi
sub ecx, 6
mov byte [esp + 0x35], al
mov dword [esp + 0x36], ecx
lea ecx, [esp + 0x34]
mov eax, 6
mov dword [esp + 0x1c], ecx
cmp edi, dword [esp + 0x14]
jae 0x5139f3
movzx edx, byte [esp + 0x3c]
cmp eax, edx
jne 0x513acf
mov ecx, dword [esp + 0x20]
lea edx, [ecx + eax]
cmp edx, 0x20
ja 0x513acf
mov esi, dword [ebp + 0x10]
cmp esi, 8
jae 0x513acf
movzx edx, byte [esp + 0x5c]
mov byte [esi + ebp + 0x14], dl
mov esi, dword [ebp + 0x10]
mov dl, byte [esp + 0x12]
mov byte [esi + ebp + 0x1c], dl
mov edi, dword [ebp + 8]
inc dword [ebp + 0x10]
mov esi, dword [esp + 0x1c]
add edi, ecx
add dl, al
mov ecx, eax
mov al, byte [esp + 0x3c]
add byte [esp + 0x5c], al
rep movsb byte es:[edi], byte [esi]
mov byte [esp + 0x12], dl
test ebx, ebx
je 0x513833
cmp byte [esp + 0x5c], 5
jae 0x513ac2
movzx edi, byte [esp + 0x5c]
mov ebx, dword [ebp]
mov edx, 5
lea esi, [ebx + edi]
sub edx, edi
call fcn.005137c0
test eax, eax
jne 0x513ac2
mov edx, 2
cmp byte [esp + 0x5c], dl
jae 0x513a81
sub edx, edi
call fcn.005137c0
test eax, eax
je 0x513acf
lea ecx, [ebx - 5]
call fcn.00512e50
test eax, eax
je 0x513acf
mov eax, dword [ebp]
mov dl, byte [eax - 5]
sub eax, 5
test dl, dl
je 0x513aa4
cmp dl, 0x90
je 0x513aa4
cmp dl, 0xcc
jne 0x513acf
mov ecx, 1
lea esp, [esp]
cmp byte [ecx + eax], dl
jne 0x513acf
inc ecx
cmp ecx, 5
jb 0x513ab0
mov dword [ebp + 0xc], 1
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x48
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x48
ret