Function at 0x409680
Capabilities:
Check for software breakpoints

Disassembly:
sub esp, 0x2c
push ebp
mov ebp, ecx
xor edx, edx
mov ecx, dword [esp + 0x3c]
push esi
xor esi, esi
mov dword [esp + 0x30], ebp
mov dword [esp + 0x14], edx
mov dword [esp + 0xc], esi
cmp dword [ebp + 0x58], edx
jle 0x409db2
mov eax, 8
mov dword [esp + 0x18], edx
sub eax, ecx
push ebx
mov dword [esp + 0x30], eax
push edi
mov edx, dword [ebp + 0x20]
mov eax, dword [edx + esi*4]
test eax, eax
je 0x409723
movzx eax, byte [eax]
mov ecx, dword [esp + 0x50]
movzx ebx, byte [ecx + eax*4 + 0x416220]
cmp ebx, 0xcc
jb 0x409718
mov eax, dword [esp + 0x40]
mov edi, dword [eax + 0x70]
inc dword [edi + 0x100]
mov edx, dword [edi + 0x100]
lea ecx, [edx - 0x18]
and ecx, 0x3f
lea eax, [edx + 9]
and eax, 0x3f
and edx, 0x3f
mov esi, dword [edi + ecx*4]
mov ecx, 0x1c4
xor esi, dword [edi + eax*4]
sub ecx, ebx
sar ecx, 3
mov dword [edi + edx*4], esi
shl esi, cl
test esi, esi
mov esi, dword [esp + 0x14]
je 0x409718
sub ebx, 4
mov eax, dword [ebp + 0x20]
mov eax, dword [eax + esi*4]
mov byte [eax], bl
mov edx, dword [ebp + 0x20]
mov ebx, dword [esp + 0x40]
mov eax, dword [ebx + 0x68]
mov ecx, dword [eax]
cmp ecx, 1
jle 0x409748
mov eax, dword [ebp + 0x50]
mov eax, dword [eax + esi*4]
cmp byte [eax], 0
jne 0x409748
mov dword [edx + esi*4], 0
jmp 0x409b3a
lea eax, [ecx - 1]
cmp eax, 6
ja case.default.0x409750
jmp dword [eax*4 + 0x409dc8]
mov eax, dword [ebp + 0x30]
mov ecx, dword [esp + 0x44]
and ecx, 1
inc ecx
mov eax, dword [eax + esi*4]
add eax, ecx
mov dword [edx + esi*4], eax
jmp 0x409b3a
mov eax, dword [ebp + 0x30]
mov ecx, dword [esp + 0x44]
and ecx, 3
add ecx, 3
mov eax, dword [eax + esi*4]
add eax, ecx
mov dword [edx + esi*4], eax
jmp 0x409b3a
mov eax, dword [ebp + 0x40]
mov ecx, dword [eax + esi*4]
mov eax, ecx
add ecx, dword [esp + 0x44]
shr eax, 0x10
push eax
mov eax, dword [ebp + 4]
dec eax
and ecx, eax
shl ecx, 6
add ecx, dword [ebp + 0x10]
call fcn.004066a0
mov ecx, eax
mov eax, dword [ebp + 0x20]
mov dword [eax + esi*4], ecx
mov eax, dword [ebp + 0x30]
jmp 0x409b37
mov eax, dword [ebp + 0x40]
mov edx, dword [esp + 0x44]
mov edi, dword [eax + esi*4]
add edx, edi
mov eax, dword [ebp + 4]
dec eax
shr edi, 0x10
and edx, eax
mov dword [esp + 0x28], edi
shl edx, 6
add edx, dword [ebp + 0x10]
movzx eax, byte [edx + 0xe]
mov ebx, eax
mov dword [esp + 0x2c], eax
and ebx, 0xf
cmp word [edx + ebx*2], di
jne 0x4097ff
lea ecx, [ebx*8]
sub ecx, ebx
add ecx, 0xf
add ecx, edx
jmp 0x409899
mov eax, 0xffff
mov dword [esp + 0x24], 0
mov dword [esp + 0x18], eax
lea esi, [edx + 0xf]
xor ecx, ecx
cmp word [edx + ecx*2], di
je 0x40987c
movzx edi, byte [esi]
cmp edi, eax
jge 0x409841
cmp ebx, ecx
je 0x409841
mov eax, dword [esp + 0x2c]
shr eax, 4
cmp eax, ecx
je 0x40983d
mov eax, edi
mov dword [esp + 0x24], ecx
mov dword [esp + 0x18], eax
jmp 0x409841
mov eax, dword [esp + 0x18]
mov edi, dword [esp + 0x28]
inc ecx
add esi, 7
cmp ecx, 7
jl 0x409815
mov ecx, dword [esp + 0x24]
xor ebx, ebx
mov al, cl
or al, 0xf0
mov byte [edx + 0xe], al
mov eax, edi
mov word [edx + ecx*2], ax
lea eax, [ecx*8]
sub eax, ecx
add eax, 0xf
add eax, edx
mov ecx, eax
mov dword [eax], ebx
mov word [eax + 4], bx
mov byte [eax + 6], bl
jmp 0x409895
mov al, byte [edx + 0xe]
shl al, 4
or al, cl
mov byte [edx + 0xe], al
lea eax, [ecx*8]
sub eax, ecx
lea ecx, [edx + 0xf]
add ecx, eax
mov esi, dword [esp + 0x14]
mov eax, dword [ebp + 0x20]
mov dword [eax + esi*4], ecx
mov eax, dword [ebp + 0x30]
mov dword [eax + esi*4], ecx
mov eax, dword [ebp + 0x30]
mov eax, dword [eax + esi*4]
cmp byte [eax + 3], 2
jne 0x409adf
movzx edx, byte [eax + 4]
mov eax, dword [ebp + 0x40]
add edx, 0x100
mov dword [esp + 0x18], edx
shr edx, 6
mov esi, dword [eax + esi*4]
add edx, esi
mov eax, dword [ebp + 4]
dec eax
shr esi, 0x10
and edx, eax
mov dword [esp + 0x2c], esi
shl edx, 6
add edx, dword [ebp + 0x10]
movzx eax, byte [edx + 0xe]
mov ebx, eax
mov dword [esp + 0x30], eax
and ebx, 0xf
cmp word [edx + ebx*2], si
jne 0x409902
lea eax, [ebx*8]
sub eax, ebx
jmp 0x409993
mov eax, 0xffff
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], eax
lea edi, [edx + 0xf]
xor ecx, ecx
cmp word [edx + ecx*2], si
je 0x40997f
movzx esi, byte [edi]
cmp esi, eax
jge 0x409944
cmp ebx, ecx
je 0x409944
mov eax, dword [esp + 0x30]
shr eax, 4
cmp eax, ecx
je 0x409940
mov eax, esi
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], eax
jmp 0x409944
mov eax, dword [esp + 0x28]
mov esi, dword [esp + 0x2c]
inc ecx
add edi, 7
cmp ecx, 7
jl 0x409918
mov ecx, dword [esp + 0x24]
xor ebx, ebx
mov al, cl
or al, 0xf0
mov byte [edx + 0xe], al
mov eax, esi
mov word [edx + ecx*2], ax
lea eax, [ecx*8]
sub eax, ecx
add eax, 0xf
add eax, edx
mov esi, eax
mov dword [eax], ebx
mov word [eax + 4], bx
mov byte [eax + 6], bl
jmp 0x409998
mov al, byte [edx + 0xe]
shl al, 4
or al, cl
mov byte [edx + 0xe], al
lea eax, [ecx*8]
sub eax, ecx
lea esi, [edx + 0xf]
add esi, eax
mov ebx, dword [esp + 0x18]
mov ecx, ebx
shr ecx, 5
mov edx, ebx
mov al, cl
shr edx, 4
and al, 1
and ecx, 1
inc al
mov byte [esi], al
mov al, dl
and al, 1
and edx, 3
inc al
mov byte [ecx + esi + 1], al
mov ecx, ebx
shr ecx, 3
mov al, cl
and al, 1
inc al
mov byte [edx + esi + 3], al
mov eax, dword [ebp + 0x40]
mov edx, dword [esp + 0x14]
mov edi, dword [eax + edx*4]
mov eax, dword [ebp + 4]
dec eax
lea edx, [edi + ecx]
shr edi, 0x10
and edx, eax
mov dword [esp + 0x28], edi
shl edx, 6
add edx, dword [ebp + 0x10]
movzx eax, byte [edx + 0xe]
mov ecx, eax
mov dword [esp + 0x24], eax
and ecx, 0xf
mov dword [esp + 0x30], ecx
cmp word [edx + ecx*2], di
jne 0x409a17
lea esi, [ecx*8]
sub esi, ecx
add esi, 0xf
add esi, edx
jmp 0x409aa7
xor ecx, ecx
lea esi, [edx + 0xf]
mov ebx, 0xffff
mov dword [esp + 0x2c], ecx
xor eax, eax
cmp word [edx + eax*2], di
je 0x409a8a
movzx edi, byte [esi]
cmp edi, ebx
jge 0x409a53
cmp dword [esp + 0x30], eax
je 0x409a53
mov ecx, dword [esp + 0x24]
shr ecx, 4
cmp ecx, eax
je 0x409a4f
mov ecx, eax
mov ebx, edi
mov dword [esp + 0x2c], ecx
jmp 0x409a53
mov ecx, dword [esp + 0x2c]
mov edi, dword [esp + 0x28]
inc eax
add esi, 7
cmp eax, 7
jl 0x409a27
mov al, cl
xor ebx, ebx
or al, 0xf0
mov byte [edx + 0xe], al
mov eax, edi
mov word [edx + ecx*2], ax
lea eax, [ecx*8]
sub eax, ecx
add eax, 0xf
add eax, edx
mov esi, eax
mov dword [eax], ebx
mov word [eax + 4], bx
mov byte [eax + 6], bl
jmp 0x409aa3
mov cl, byte [edx + 0xe]
lea esi, [edx + 0xf]
shl cl, 4
or cl, al
mov byte [edx + 0xe], cl
lea ecx, [eax*8]
sub ecx, eax
add esi, ecx
mov ebx, dword [esp + 0x18]
mov ecx, ebx
mov edx, ebx
shr ecx, 2
and bl, 1
mov al, cl
shr edx, 1
and al, 1
and ecx, 1
inc al
inc bl
mov byte [esi], al
mov al, dl
and al, 1
inc al
and edx, 3
mov byte [ecx + esi + 1], al
mov byte [edx + esi + 3], bl
mov eax, dword [ebp + 0x30]
mov esi, dword [esp + 0x14]
mov eax, dword [eax + esi*4]
mov byte [eax + 6], 0
mov eax, dword [ebp + 0x50]
mov ebx, dword [esp + 0x4c]
mov edx, dword [eax + esi*4]
mov cl, byte [edx]
test cl, cl
jne 0x409afd
mov byte [edx], 2
mov eax, dword [ebp + 0x50]
mov eax, dword [eax + esi*4]
mov byte [eax + 1], bl
jmp 0x409b27
movzx eax, byte [edx + 1]
cmp eax, ebx
je 0x409b13
mov byte [edx], 1
mov eax, dword [ebp + 0x50]
mov eax, dword [eax + esi*4]
mov byte [eax + 1], bl
jmp 0x409b27
cmp cl, 0xfe
jae 0x409b1f
add cl, 2
mov byte [edx], cl
jmp 0x409b27
cmp cl, 0xff
jne 0x409b27
mov byte [edx], 0x80
mov eax, dword [ebp + 0x30]
mov ebx, dword [esp + 0x40]
mov ecx, dword [eax + esi*4]
mov eax, dword [ebp + 0x50]
add ecx, 3
mov dword [eax + esi*4], ecx
mov eax, dword [ebp + 0x50]
mov ecx, dword [esp + 0x34]
mov esi, dword [eax + esi*4]
mov dl, byte [esi + 1]
movzx eax, dl
add eax, 0x100
sar eax, cl
cmp eax, dword [esp + 0x44]
jne 0x409ba2
mov ecx, dword [esp + 0x40]
movzx esi, byte [esi]
mov edi, dword [ecx + 0x44]
mov bl, byte [esi + 0x4352c1]
not esi
and esi, 1
lea eax, [edi + 1]
mov dword [ecx + 0x44], eax
mov cl, 7
sub cl, byte [esp + 0x48]
shr dl, cl
lea ecx, [esi + 2]
and dl, 1
movzx eax, bl
mov ebx, dword [esp + 0x40]
movzx edx, dl
add dx, dx
shl ax, cl
dec dx
cwde
movsx ecx, dx
imul ecx, eax
mov eax, dword [ebx + 0x18]
mov word [eax + edi*2], cx
jmp 0x409bb4
mov ecx, dword [ebx + 0x44]
xor edx, edx
lea eax, [ecx + 1]
mov dword [ebx + 0x44], eax
mov eax, dword [ebx + 0x18]
mov word [eax + ecx*2], dx
mov eax, dword [ebp + 0x20]
mov edx, dword [esp + 0x14]
mov esi, dword [ebp + 0x54]
add esi, dword [esp + 0x20]
mov eax, dword [eax + edx*4]
test eax, eax
je 0x409cc9
movzx edi, byte [eax]
mov ecx, esi
mov eax, dword [ebx + 0x5c]
push 0x3ff
push edi
mov dword [esp + 0x34], edi
push dword [eax]
call fcn.0040bcb0
mov ecx, dword [ebx + 0x44]
mov esi, eax
mov ebp, dword [esp + 0x40]
movsx edx, word [esi*2 + 0x4332c0]
lea eax, [ecx + 1]
mov dword [ebx + 0x44], eax
mov eax, dword [ebp + 0x18]
sar edx, 2
movzx ebx, dx
sar esi, 4
mov word [eax + ecx*2], bx
mov edx, dword [ebp + 0x44]
movzx ecx, si
mov dword [esp + 0x30], ecx
lea eax, [edx + 1]
mov dword [ebp + 0x44], eax
mov ebp, 0xff
sub ebp, esi
mov esi, dword [esp + 0x40]
sub ecx, ebp
mov eax, dword [esi + 0x18]
mov word [eax + edx*2], cx
mov edx, dword [esi + 0x44]
mov ecx, dword [esp + 0x2c]
lea eax, [edx + 1]
mov dword [esi + 0x44], eax
xor eax, eax
cmp byte [edi*4 + 0x416222], al
setne al
dec eax
movzx edi, ax
xor eax, eax
cmp byte [ecx*4 + 0x416223], al
setne al
dec eax
movzx esi, ax
mov ecx, esi
sub ecx, edi
imul ecx, ebx
mov ebx, dword [esp + 0x40]
mov eax, dword [ebx + 0x18]
mov word [eax + edx*2], cx
mov edx, dword [ebx + 0x44]
lea eax, [edx + 1]
mov dword [ebx + 0x44], eax
mov eax, ebp
mov ebx, dword [esp + 0x30]
and eax, esi
mov ecx, ebx
and ebp, edi
and ecx, edi
and ebx, esi
sub ecx, eax
sub ebx, ebp
mov eax, dword [esp + 0x40]
mov ebp, dword [esp + 0x38]
mov eax, dword [eax + 0x18]
mov word [eax + edx*2], cx
mov edx, dword [esp + 0x40]
mov ecx, dword [edx + 0x44]
lea eax, [ecx + 1]
mov dword [edx + 0x44], eax
mov eax, dword [edx + 0x18]
mov edx, dword [esp + 0x1c]
mov word [eax + ecx*2], bx
xor eax, eax
cmp eax, dword [esp + 0x2c]
sbb eax, eax
neg eax
add edx, eax
mov dword [esp + 0x1c], edx
jmp 0x409d95
mov eax, dword [ebx + 0x5c]
mov ecx, dword [esi + 4]
mov edx, dword [eax]
mov eax, dword [esi + 0x14]
lea eax, [eax + ecx*4]
mov dword [esp + 0x30], eax
mov eax, dword [eax]
mov ecx, eax
mov edi, eax
and ecx, 0x3ff
shr edi, 0xa
cmp ecx, 0x3ff
jae 0x409cf5
inc eax
jmp 0x409cfa
or eax, 0x3ff
shl edx, 0x16
sub edx, edi
sar edx, 3
imul edx, dword [ecx*4 + 0x4452c0]
and edx, 0xfffffc00
add edx, eax
mov eax, dword [esp + 0x30]
mov dword [eax], edx
mov dword [esi + 4], 0
mov eax, dword [esi + 0x14]
mov ecx, dword [ebx + 0x44]
mov esi, dword [eax]
shr esi, 0x14
lea eax, [ecx + 1]
movsx edx, word [esi*2 + 0x4332c0]
mov dword [ebx + 0x44], eax
mov eax, dword [ebx + 0x18]
sar edx, 2
sar esi, 4
mov word [eax + ecx*2], dx
mov edx, dword [ebx + 0x44]
lea ecx, [esi*2 - 0xff]
movzx esi, cx
lea eax, [edx + 1]
mov dword [ebx + 0x44], eax
mov eax, dword [ebx + 0x18]
mov word [eax + edx*2], cx
xor edx, edx
mov ecx, dword [ebx + 0x44]
lea eax, [ecx + 1]
mov dword [ebx + 0x44], eax
mov eax, dword [ebx + 0x18]
mov word [eax + ecx*2], dx
mov ecx, dword [ebx + 0x44]
mov edx, dword [esp + 0x1c]
lea eax, [ecx + 1]
mov dword [ebx + 0x44], eax
mov eax, dword [ebx + 0x18]
mov word [eax + ecx*2], si
mov ecx, dword [ebx + 0x44]
lea eax, [ecx + 1]
mov dword [ebx + 0x44], eax
mov eax, dword [ebx + 0x18]
mov word [eax + ecx*2], si
mov esi, dword [esp + 0x14]
add dword [esp + 0x20], 0x18
inc esi
mov dword [esp + 0x14], esi
cmp esi, dword [ebp + 0x58]
jl 0x4096b5
mov ecx, dword [esp + 0x48]
pop edi
pop ebx
mov eax, edx
cmp ecx, 7
jne 0x409dc0
mov dword [ebp + 0x58], 0
pop esi
pop ebp
add esp, 0x2c
ret 0x14