Function at 0x10039780
Capabilities:
Check for software breakpoints

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov eax, dword [0x1004f040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
mov byte [ebp - 0x1c], 0xe8
xor ch, ch
mov dword [ebp - 0x54], edi
xor al, al
mov dword [ebp - 0x1b], 0
mov byte [ebp - 0xc], 0xe9
mov dword [ebp - 0xb], 0
mov word [ebp - 0x14], 0x800f
mov dword [ebp - 0x12], 0
mov byte [ebp - 0x39], ch
mov byte [ebp - 0x3a], al
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x44], 0
mov dword [edi + 0xc], 0
mov dword [edi + 0x10], 0
movzx esi, ch
lea edx, [ebp - 0x38]
add esi, dword [edi]
movzx ecx, al
mov eax, dword [edi + 8]
add eax, ecx
mov dword [ebp - 0x58], ecx
mov ecx, esi
mov dword [ebp - 0x48], eax
call fcn.10038860
test dword [ebp - 0x20], 0x1000
mov ebx, eax
mov dword [ebp - 0x4c], ebx
jne 0x10039aaf
cmp byte [ebp - 0x39], 5
mov ecx, esi
mov dword [ebp - 0x50], ecx
jb 0x1003983a
mov eax, esi
mov dword [ebp - 0x44], 1
sub eax, dword [ebp - 0x48]
lea ecx, [ebp - 0xc]
sub eax, 5
mov ebx, 5
mov dword [ebp - 0xb], eax
jmp 0x10039960
mov dl, byte [ebp - 0x32]
cmp dl, 0xe8
jne 0x10039861
movzx eax, byte [ebp - 0x38]
lea ecx, [ebp - 0x1c]
sub eax, dword [ebp - 0x48]
mov ebx, 5
add eax, 0xfffffffb
add eax, dword [ebp - 0x28]
add eax, esi
mov dword [ebp - 0x1b], eax
jmp 0x10039960
mov al, dl
and al, 0xfd
cmp al, 0xe9
jne 0x100398c1
movzx ecx, byte [ebp - 0x38]
add ecx, esi
cmp dl, 0xeb
jne 0x1003987c
movsx eax, byte [ebp - 0x28]
add ecx, eax
jmp 0x1003987f
add ecx, dword [ebp - 0x28]
mov eax, dword [edi]
cmp eax, ecx
ja 0x100398a0
add eax, 5
cmp ecx, eax
jae 0x100398a0
cmp dword [ebp - 0x40], ecx
cmovae ecx, dword [ebp - 0x40]
mov eax, ecx
mov ecx, dword [ebp - 0x50]
mov dword [ebp - 0x40], eax
jmp 0x10039963
sub ecx, dword [ebp - 0x48]
mov ebx, 5
mov eax, dword [ebp - 0x40]
sub ecx, 5
cmp esi, eax
mov dword [ebp - 0xb], ecx
lea ecx, [ebp - 0xc]
sbb edx, edx
inc edx
mov dword [ebp - 0x44], edx
jmp 0x10039963
mov dh, byte [ebp - 0x31]
mov bl, dl
and bl, 0xf0
cmp bl, 0x70
je 0x100398f4
mov al, dl
and al, 0xfc
cmp al, 0xe0
je 0x100398f4
mov al, dh
and al, 0xf0
cmp al, 0x80
je 0x100398f4
mov ebx, dword [ebp - 0x4c]
and dl, 0xfe
cmp dl, 0xc2
jne 0x10039960
cmp esi, dword [ebp - 0x40]
sbb edx, edx
inc edx
mov dword [ebp - 0x44], edx
jmp 0x10039960
movzx ecx, byte [ebp - 0x38]
add ecx, esi
cmp bl, 0x70
je 0x1003990c
mov al, dl
and al, 0xfc
cmp al, 0xe0
je 0x1003990c
add ecx, dword [ebp - 0x28]
jmp 0x10039912
movsx eax, byte [ebp - 0x28]
add ecx, eax
mov eax, dword [edi]
cmp eax, ecx
ja 0x10039931
add eax, 5
cmp ecx, eax
jae 0x10039931
cmp dword [ebp - 0x40], ecx
mov ebx, dword [ebp - 0x4c]
cmovae ecx, dword [ebp - 0x40]
mov dword [ebp - 0x40], ecx
mov ecx, dword [ebp - 0x50]
jmp 0x10039960
mov al, dl
and al, 0xfc
cmp al, 0xe0
je 0x10039aaf
movzx eax, dl
cmp dl, 0xf
jne 0x10039948
movzx eax, dh
sub ecx, dword [ebp - 0x48]
and al, 0xf
or al, 0x80
mov ebx, 6
sub ecx, 6
mov byte [ebp - 0x13], al
mov dword [ebp - 0x12], ecx
lea ecx, [ebp - 0x14]
mov eax, dword [ebp - 0x40]
cmp esi, eax
jae 0x10039973
movzx eax, byte [ebp - 0x38]
cmp ebx, eax
jne 0x10039aaf
mov esi, dword [ebp - 0x58]
lea eax, [esi + ebx]
cmp eax, 0x20
ja 0x10039aaf
mov eax, dword [edi + 0x10]
cmp eax, 8
jae 0x10039aaf
mov dl, byte [ebp - 0x39]
mov byte [eax + edi + 0x14], dl
mov eax, dword [edi + 0x10]
mov dl, byte [ebp - 0x3a]
mov byte [eax + edi + 0x1c], dl
mov al, dl
inc dword [edi + 0x10]
add al, bl
mov edi, dword [edi + 8]
add edi, esi
mov byte [ebp - 0x3a], al
mov esi, ecx
mov ecx, ebx
rep movsb byte es:[edi], byte [esi]
mov ch, byte [ebp - 0x39]
add ch, byte [ebp - 0x38]
cmp dword [ebp - 0x44], 0
mov edi, dword [ebp - 0x54]
mov byte [ebp - 0x39], ch
je 0x100397e1
cmp ch, 5
jae 0x10039a99
mov edx, dword [edi]
movzx ebx, ch
add edx, ebx
mov cl, byte [edx]
test cl, cl
je 0x100399ea
cmp cl, 0x90
je 0x100399ea
cmp cl, 0xcc
jne 0x10039a20
mov esi, 5
mov eax, 1
sub esi, ebx
cmp esi, eax
jbe 0x10039a99
nop
cmp byte [edx + eax], cl
jne 0x10039a20
inc eax
cmp eax, esi
jb 0x10039a00
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10041f82
mov esp, ebp
pop ebp
ret
cmp ch, 2
jae 0x10039a4d
test cl, cl
je 0x10039a33
cmp cl, 0x90
je 0x10039a33
cmp cl, 0xcc
jne 0x10039aaf
mov esi, 2
mov eax, 1
sub esi, ebx
cmp esi, eax
jbe 0x10039a4d
cmp byte [edx + eax], cl
jne 0x10039aaf
inc eax
cmp eax, esi
jb 0x10039a43
push 0x1c
lea eax, [ebp - 0x38]
push eax
mov eax, dword [edi]
add eax, 0xfffffffb
push eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
cmp dword [ebp - 0x28], 0x1000
jne 0x10039aaf
test byte [ebp - 0x24], 0xf0
je 0x10039aaf
mov edx, dword [edi]
mov cl, byte [edx - 5]
test cl, cl
je 0x10039a81
cmp cl, 0x90
je 0x10039a81
cmp cl, 0xcc
jne 0x10039aaf
mov eax, 1
cmp byte [edx + eax - 5], cl
jne 0x10039aaf
inc eax
cmp eax, 5
jb 0x10039a86
mov dword [edi + 0xc], 1
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10041f82
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10041f82
mov esp, ebp
pop ebp
ret