Function at 0x10040080
Capabilities:
Check for software breakpoints

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov eax, dword [0x100b9008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
mov byte [ebp - 0x1c], 0xe8
xor cl, cl
mov dword [ebp - 0x50], edi
xor ah, ah
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], cl
mov byte [ebp - 0x3a], ah
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x44], 0
mov dword [edi + 0xc], 0
mov dword [edi + 0x10], 0
mov ebx, dword [edi + 8]
lea edx, [ebp - 0x38]
movzx esi, cl
add esi, dword [edi]
movzx eax, ah
mov ecx, esi
add ebx, eax
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x4c], ebx
call fcn.1003f0b0
test dword [ebp - 0x20], 0x1000
mov edx, eax
mov dword [ebp - 0x54], edx
jne 0x10040379
mov ch, byte [ebp - 0x39]
mov dword [ebp - 0x48], esi
cmp ch, 5
jb 0x1004013d
mov eax, esi
mov edx, 5
sub eax, ebx
mov ebx, 1
sub eax, 5
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0xb], eax
lea eax, [ebp - 0xc]
mov dword [ebp - 0x48], eax
jmp 0x1004028b
mov bl, byte [ebp - 0x32]
cmp bl, 0xe8
jne 0x1004016c
mov cl, byte [ebp - 0x38]
mov edx, 5
mov ebx, dword [ebp - 0x44]
movzx eax, cl
sub eax, dword [ebp - 0x4c]
add eax, 0xfffffffb
add eax, dword [ebp - 0x28]
add eax, esi
mov dword [ebp - 0x1b], eax
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x48], eax
jmp 0x1004028e
mov al, bl
and al, 0xfd
cmp al, 0xe9
jne 0x100401da
movzx eax, byte [ebp - 0x38]
add eax, esi
cmp bl, 0xeb
jne 0x10040187
movsx ecx, byte [ebp - 0x28]
add eax, ecx
jmp 0x1004018a
add eax, dword [ebp - 0x28]
mov ecx, dword [edi]
cmp ecx, eax
ja 0x100401b0
add ecx, 5
cmp eax, ecx
jae 0x100401b0
mov ecx, dword [ebp - 0x40]
cmp ecx, eax
mov ebx, dword [ebp - 0x44]
cmovae eax, ecx
mov cl, byte [ebp - 0x38]
mov ch, byte [ebp - 0x39]
mov dword [ebp - 0x40], eax
jmp 0x10040291
sub eax, dword [ebp - 0x4c]
mov edx, 5
mov cl, byte [ebp - 0x38]
sub eax, 5
mov ch, byte [ebp - 0x39]
mov dword [ebp - 0xb], eax
lea eax, [ebp - 0xc]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x40]
cmp esi, eax
sbb ebx, ebx
inc ebx
mov dword [ebp - 0x44], ebx
jmp 0x10040291
mov ch, byte [ebp - 0x31]
mov cl, bl
and cl, 0xf0
cmp cl, 0x70
je 0x10040216
mov al, bl
and al, 0xfc
cmp al, 0xe0
je 0x10040216
mov al, ch
and al, 0xf0
cmp al, 0x80
je 0x10040216
mov ch, byte [ebp - 0x39]
and bl, 0xfe
cmp bl, 0xc2
jne 0x10040288
mov eax, dword [ebp - 0x40]
cmp esi, eax
mov cl, byte [ebp - 0x38]
sbb ebx, ebx
inc ebx
mov dword [ebp - 0x44], ebx
jmp 0x10040291
movzx edx, byte [ebp - 0x38]
add edx, esi
cmp cl, 0x70
je 0x1004022e
mov al, bl
and al, 0xfc
cmp al, 0xe0
je 0x1004022e
add edx, dword [ebp - 0x28]
jmp 0x10040234
movsx eax, byte [ebp - 0x28]
add edx, eax
mov eax, dword [edi]
cmp eax, edx
ja 0x10040250
add eax, 5
cmp edx, eax
jae 0x10040250
cmp dword [ebp - 0x40], edx
cmovae edx, dword [ebp - 0x40]
mov dword [ebp - 0x40], edx
mov edx, dword [ebp - 0x54]
jmp 0x10040285
mov al, bl
and al, 0xfc
cmp al, 0xe0
je 0x10040379
cmp bl, 0xf
movzx eax, bl
movzx ecx, ch
cmovne ecx, eax
sub edx, dword [ebp - 0x4c]
and cl, 0xf
lea eax, [ebp - 0x14]
or cl, 0x80
mov dword [ebp - 0x48], eax
sub edx, 6
mov byte [ebp - 0x13], cl
mov dword [ebp - 0x12], edx
mov edx, 6
mov ch, byte [ebp - 0x39]
mov ebx, dword [ebp - 0x44]
mov cl, byte [ebp - 0x38]
mov eax, dword [ebp - 0x40]
cmp esi, eax
jae 0x100402a0
movzx eax, cl
cmp edx, eax
jne 0x10040379
mov esi, dword [ebp - 0x58]
lea eax, [esi + edx]
cmp eax, 0x20
ja 0x10040379
mov eax, dword [edi + 0x10]
cmp eax, 8
jae 0x10040379
mov cl, byte [ebp - 0x3a]
mov byte [eax + edi + 0x14], ch
mov eax, dword [edi + 0x10]
mov byte [eax + edi + 0x1c], cl
mov ecx, edx
inc dword [edi + 0x10]
mov edi, dword [edi + 8]
mov ah, byte [ebp - 0x3a]
add edi, esi
mov esi, dword [ebp - 0x48]
add ah, dl
mov al, byte [ebp - 0x38]
rep movsb byte es:[edi], byte [esi]
mov cl, byte [ebp - 0x39]
mov edi, dword [ebp - 0x50]
add cl, al
mov byte [ebp - 0x3a], ah
mov byte [ebp - 0x39], cl
test ebx, ebx
je 0x100400e1
cmp cl, 5
jae 0x10040363
mov esi, dword [ebp - 0x50]
mov edx, 5
movzx edi, cl
sub edx, edi
mov ebx, dword [esi]
lea ecx, [ebx + edi]
call fcn.10040040
test eax, eax
jne 0x10040363
cmp byte [ebp - 0x39], 2
jae 0x1004032c
mov edx, 2
sub edx, edi
call fcn.10040040
test eax, eax
je 0x10040379
lea ecx, [ebx - 5]
call fcn.1003f060
test eax, eax
je 0x10040379
mov edx, dword [esi]
mov cl, byte [edx - 5]
test cl, cl
je 0x1004034b
cmp cl, 0x90
je 0x1004034b
cmp cl, 0xcc
jne 0x10040379
mov eax, 1
cmp byte [edx + eax - 5], cl
jne 0x10040379
inc eax
cmp eax, 5
jb 0x10040350
mov dword [esi + 0xc], 1
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1009b337
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.1009b337
mov esp, ebp
pop ebp
ret