Function at 0x66122900
Capabilities:
Encode data using xor

Disassembly:
push ebp
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x6c
fld xword [esp + 0x80]
fld st(0)
fstp xword [esp + 0x38]
fxam
wait
fnstsw ax
and ax, 0x4500
cmp ax, 0x100
je 0x66122c30
fld st(0)
fstp xword [esp + 0x20]
movzx edx, word [esp + 0x28]
test dx, dx
js 0x66122b10
fxam
wait
fnstsw ax
fstp st(0)
and ax, 0x4500
cmp ax, 0x500
je 0x66122df0
and dx, 0x7fff
mov esi, dword [esp + 0x38]
mov edi, dword [esp + 0x3c]
mov word [esp + 8], dx
jne 0x66122b20
mov edx, edi
or edx, esi
jne 0x66122ca0
mov ebp, dword [ebx + 0xc]
cmp ebp, 0xe
jbe 0x66122b48
mov eax, dword [ebx + 4]
mov dword [esp + 0xc], eax
lea eax, [esp + 0x48]
mov dword [esp + 4], eax
mov edx, dword [ebx + 0xc]
test edx, edx
jle 0x66122e88
mov byte [esp + 0x48], 0x2e
lea eax, [esp + 0x49]
mov byte [eax], 0x30
lea ebp, [eax + 1]
mov eax, dword [ebx + 8]
mov dword [esp + 0x14], eax
test eax, eax
jle 0x66122db1
mov edx, dword [ebx + 0xc]
mov eax, ebp
sub eax, dword [esp + 4]
movsx esi, word [esp + 8]
lea ecx, [eax + edx]
test edx, edx
cmovg eax, ecx
xor edx, edx
mov ecx, 0x66666667
mov dword [esp + 0x10], esi
test dword [esp + 0xc], 0x1c0
setne dl
lea edi, [eax + edx + 5]
mov eax, esi
imul ecx
mov eax, esi
mov dword [esp + 8], edi
sar eax, 0x1f
mov ecx, edx
sar ecx, 2
sub ecx, eax
je 0x66122ea0
lea esi, [esi]
mov eax, 0x66666667
add edi, 1
imul ecx
sar ecx, 0x1f
lea esi, [edi + 2]
sub si, word [esp + 8]
sar edx, 2
sub edx, ecx
mov ecx, edx
jne 0x66122a08
movsx esi, si
mov eax, dword [esp + 0x14]
cmp eax, edi
jle 0x66122de0
sub eax, edi
test dword [esp + 0xc], 0x600
je 0x66122e40
mov dword [ebx + 8], eax
test byte [esp + 0xc], 0x80
jne 0x66122dca
test dword [esp + 0xc], 0x100
jne 0x66122e10
test byte [esp + 0xc], 0x40
jne 0x66122e28
mov edx, ebx
mov eax, 0x30
call fcn.66121460
mov eax, dword [ebx + 4]
mov edx, ebx
and eax, 0x20
or eax, 0x58
call fcn.66121460
mov eax, dword [ebx + 8]
test eax, eax
jle 0x66122ab9
test byte [ebx + 5], 2
je 0x66122ab9
sub eax, 1
mov dword [ebx + 8], eax
lea esi, [esi]
nop
mov edx, ebx
mov eax, 0x30
call fcn.66121460
mov eax, dword [ebx + 8]
lea edx, [eax - 1]
mov dword [ebx + 8], edx
test eax, eax
jg 0x66122aa0
mov edi, dword [esp + 4]
cmp ebp, dword [esp + 4]
ja 0x66122aea
jmp 0x66122c5c
movzx eax, word [ebx + 0x1c]
mov word [esp + 0x36], ax
test ax, ax
jne 0x66122d80
cmp ebp, edi
je 0x66122c5c
movsx eax, byte [ebp - 1]
sub ebp, 1
cmp eax, 0x2e
je 0x66122cf0
cmp eax, 0x2c
je 0x66122ad0
mov edx, ebx
call fcn.66121460
jmp 0x66122ae2
or dword [ebx + 4], 0x80
jmp 0x6612293d
mov ebp, dword [ebx + 0xc]
sub word [esp + 8], 0x3fff
cmp ebp, 0xe
jbe 0x66122b4e
mov eax, dword [ebx + 4]
mov edx, edi
or edx, esi
mov dword [esp + 0xc], eax
jne 0x66122baa
jmp 0x66122987
shld edi, esi, 1
add esi, esi
test edi, edi
jns 0x66122b48
mov ecx, 0xe
mov eax, 4
xor edx, edx
sub ecx, ebp
shl ecx, 2
shld edx, eax, cl
shl eax, cl
test cl, 0x20
je 0x66122b71
mov edx, eax
xor eax, eax
shrd esi, edi, 1
shr edi, 1
add esi, eax
adc edi, edx
test edi, edi
js 0x66122ce0
shld edi, esi, 1
add esi, esi
mov ecx, 0xf
mov eax, dword [ebx + 4]
sub ecx, ebp
xor ebp, ebp
shl ecx, 2
mov dword [esp + 0xc], eax
shrd esi, edi, cl
shr edi, cl
test cl, 0x20
cmovne esi, edi
cmovne edi, ebp
lea eax, [esp + 0x48]
mov dword [esp + 4], eax
mov ebp, eax
mov eax, dword [esp + 0xc]
mov ecx, eax
and eax, 0x20
and ecx, 0x800
mov byte [esp + 0x10], al
mov dword [esp + 0x1c], ecx
jmp 0x66122bf2
xor edx, edx
cmp ebp, dword [esp + 4]
ja 0x66122bdf
mov ecx, dword [ebx + 0xc]
test ecx, ecx
js 0x66122be8
lea eax, [edx + 0x30]
mov byte [ebp], al
add ebp, 1
mov edx, edi
or edx, esi
je 0x66122d98
mov edx, esi
mov eax, esi
mov ecx, edi
and edx, 0xfffffff0
and eax, 0xf
or ecx, edx
je 0x66122d00
mov edx, dword [ebx + 0xc]
shrd esi, edi, 4
shr edi, 4
test edx, edx
jle 0x66122c1a
sub edx, 1
mov dword [ebx + 0xc], edx
test eax, eax
je 0x66122bd0
mov edx, eax
cmp eax, 9
jbe 0x66122bdf
add eax, 0x37
or al, byte [esp + 0x10]
jmp 0x66122be2
fstp st(0)
mov ecx, ebx
mov edx, 0x661e8adb
xor eax, eax
call fcn.66121710
add esp, 0x6c
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, ebx
mov eax, 0x30
call fcn.66121460
mov eax, dword [ebx + 0xc]
lea edx, [eax - 1]
mov dword [ebx + 0xc], edx
test eax, eax
jg 0x66122c50
mov eax, dword [ebx + 4]
mov edx, ebx
and eax, 0x20
or eax, 0x50
call fcn.66121460
add dword [ebx + 8], esi
mov eax, dword [esp + 0x10]
mov ecx, ebx
or dword [ebx + 4], 0x1c0
cdq
call fcn.66121d40
add esp, 0x6c
pop ebx
pop esi
pop edi
pop ebp
ret
test edi, edi
js 0x66122eb0
mov eax, 0xffffc001
lea esi, [esi]
shld edi, esi, 1
mov edx, eax
add esi, esi
sub eax, 1
test edi, edi
jns 0x66122cb0
mov word [esp + 8], dx
mov ebp, dword [ebx + 0xc]
cmp ebp, 0xe
jbe 0x66122b52
mov eax, dword [ebx + 4]
mov dword [esp + 0xc], eax
jmp 0x66122baa
add word [esp + 8], 1
jmp 0x66122b89
mov eax, ebx
call fcn.661217b0
jmp 0x66122ae2
cmp ebp, dword [esp + 4]
ja 0x66122d18
mov ecx, dword [esp + 0x1c]
test ecx, ecx
jne 0x66122d18
mov edx, dword [ebx + 0xc]
test edx, edx
jle 0x66122d1f
lea esi, [esi]
mov byte [ebp], 0x2e
add ebp, 1
movzx edx, word [esp + 8]
mov ecx, esi
xor ecx, 1
sub edx, 1
mov dword [esp + 0x14], ecx
mov word [esp + 0x1a], dx
mov edx, dword [esp + 0x14]
or edx, edi
je 0x66122e78
mov dword [esp + 8], eax
movzx edx, word [esp + 0x1a]
mov dword [esp + 0x14], ebx
nop
shrd esi, edi, 1
shr edi, 1
mov ebx, edx
mov ecx, esi
mov eax, edi
lea edx, [ebx - 1]
xor ecx, 1
or eax, ecx
jne 0x66122d50
mov eax, dword [esp + 8]
xor esi, esi
mov word [esp + 8], bx
xor edi, edi
mov ebx, dword [esp + 0x14]
jmp 0x66122c1a
mov ecx, ebx
mov edx, 1
lea eax, [esp + 0x36]
call fcn.661214c0
jmp 0x66122ae2
cmp ebp, dword [esp + 4]
je 0x6612298f
mov eax, dword [ebx + 8]
mov dword [esp + 0x14], eax
test eax, eax
jg 0x661229b8
movsx eax, word [esp + 8]
mov esi, 2
mov dword [esp + 0x10], eax
test byte [esp + 0xc], 0x80
je 0x66122a53
mov edx, ebx
mov eax, 0x2d
call fcn.66121460
jmp 0x66122a6c
mov dword [ebx + 8], 0xffffffff
jmp 0x66122a48
mov eax, edx
mov ecx, ebx
mov edx, 0x661e8adf
and eax, 0x8000
call fcn.66121710
add esp, 0x6c
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, ebx
mov eax, 0x2b
call fcn.66121460
jmp 0x66122a6c
mov edx, ebx
mov eax, 0x20
call fcn.66121460
jmp 0x66122a6c
lea edx, [eax - 1]
mov dword [ebx + 8], edx
test eax, eax
jle 0x66122a48
nop
mov edx, ebx
mov eax, 0x20
call fcn.66121460
mov eax, dword [ebx + 8]
lea edx, [eax - 1]
mov dword [ebx + 8], edx
test eax, eax
jg 0x66122e50
mov eax, dword [ebx + 4]
mov dword [esp + 0xc], eax
jmp 0x66122a48
xor esi, esi
xor edi, edi
jmp 0x66122c1a
mov eax, dword [esp + 4]
test dword [esp + 0xc], 0x800
je 0x661229a3
jmp 0x6612299a
mov edi, dword [esp + 8]
mov esi, 2
jmp 0x66122a29
mov eax, 0xffffc002
mov word [esp + 8], ax
jmp 0x66122cc4