Function at 0x416f70
Capabilities:
Encode data using xor

Disassembly:
push ebp
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x5c
fld xword [esp + 0x70]
fld st(0)
fstp xword [esp + 0x28]
fxam
wait
fnstsw ax
and ax, 0x4500
cmp ax, 0x100
je 0x417469
movzx edi, word [esp + 0x30]
mov esi, edi
and esi, 0x8000
jne 0x4171c1
fxam
wait
fnstsw ax
fstp st(0)
and ax, 0x4500
cmp ax, 0x500
je 0x41747e
and di, 0x7fff
mov ecx, edi
je 0x4171d0
mov eax, dword [ebx + 0xc]
lea ebp, [ecx - 0x3fff]
mov esi, dword [esp + 0x28]
mov edi, dword [esp + 0x2c]
cmp eax, 0xe
mov dword [esp + 0xc], eax
ja 0x41743c
test edi, edi
js 0x416ffc
mov ecx, ebp
nop
shld edi, esi, 1
add esi, esi
test edi, edi
jns 0x416ff0
mov ebp, ecx
mov ecx, 0xe
sub ecx, dword [esp + 0xc]
mov eax, 4
xor edx, edx
shrd esi, edi, 1
shr edi, 1
shl ecx, 2
shld edx, eax, cl
shl eax, cl
test cl, 0x20
je 0x417023
mov edx, eax
xor eax, eax
add eax, esi
adc edx, edi
test edx, edx
js 0x417461
shld edx, eax, 1
add eax, eax
mov ecx, 0xf
sub ecx, dword [esp + 0xc]
xor esi, esi
shl ecx, 2
shrd eax, edx, cl
shr edx, cl
test cl, 0x20
cmovne eax, edx
cmovne edx, esi
mov edi, edx
mov esi, eax
mov eax, dword [ebx + 4]
lea edx, [esp + 0x38]
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], edx
mov ecx, eax
mov dword [esp + 0x18], eax
and eax, 0x20
and ecx, 0x800
mov byte [esp + 0x14], al
mov dword [esp + 0x1c], ecx
nop
lea esi, [esi]
mov eax, esi
and eax, 0xf
cmp esi, eax
je 0x417240
mov ebx, dword [esp + 0xc]
mov ecx, dword [ebx + 0xc]
test ecx, ecx
jle 0x4170a2
mov ebx, dword [esp + 0xc]
sub ecx, 1
mov dword [ebx + 0xc], ecx
shrd esi, edi, 4
mov ebx, edx
shr edi, 4
test eax, eax
je 0x417220
cmp eax, 9
lea edx, [ebx + 1]
jle 0x417234
add eax, 0x37
or al, byte [esp + 0x14]
mov byte [ebx], al
mov eax, edi
or eax, esi
jne 0x417080
mov edi, dword [esp + 0x10]
mov dword [esp + 0x14], edx
mov ebx, dword [esp + 0xc]
cmp edx, edi
je 0x41749b
mov eax, dword [ebx + 8]
test eax, eax
mov dword [esp + 0x1c], eax
jle 0x4173c9
mov eax, dword [esp + 0x14]
sub eax, dword [esp + 0x10]
movsx edi, bp
mov edx, dword [ebx + 0xc]
mov dword [esp + 0xc], edi
test edx, edx
lea ecx, [eax + edx]
mov edx, dword [esp + 0x18]
cmovg eax, ecx
mov ecx, 0x66666667
and edx, 0x1c0
cmp edx, 1
sbb edx, edx
lea esi, [eax + edx + 6]
mov eax, edi
imul ecx
mov eax, edi
sar eax, 0x1f
sar edx, 2
mov ecx, edx
sub ecx, eax
je 0x417491
mov edi, 2
mov ebp, 0x66666667
mov eax, ecx
sar ecx, 0x1f
add esi, 1
imul ebp
add edi, 1
sar edx, 2
sub edx, ecx
mov ecx, edx
jne 0x417143
movsx edi, di
mov eax, dword [esp + 0x1c]
cmp eax, esi
jle 0x4172a0
sub eax, esi
test dword [esp + 0x18], 0x600
jne 0x417423
sub eax, 1
mov dword [ebx + 8], eax
nop
mov edx, ebx
mov eax, 0x20
call fcn.00415e00
mov eax, dword [ebx + 8]
lea edx, [eax - 1]
test eax, eax
mov dword [ebx + 8], edx
jg 0x417180
mov eax, dword [ebx + 4]
mov dword [esp + 0x18], eax
test byte [esp + 0x18], 0x80
je 0x4172b2
nop
lea esi, [esi]
mov edx, ebx
mov eax, 0x2d
call fcn.00415e00
jmp 0x4172cb
or dword [ebx + 4], 0x80
jmp 0x416fa9
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x28]
mov edi, edx
or edi, eax
je 0x4173da
test edx, edx
js 0x4174a7
mov ecx, 0xffffc001
nop
shld edx, eax, 1
mov edi, ecx
add eax, eax
sub ecx, 1
test edx, edx
jns 0x4171f0
mov ebp, edi
mov esi, eax
mov edi, edx
mov eax, dword [ebx + 0xc]
cmp eax, 0xe
mov dword [esp + 0xc], eax
ja 0x417055
jmp 0x416ffc
cmp ebx, dword [esp + 0x10]
ja 0x417231
mov edx, dword [esp + 0xc]
mov edx, dword [edx + 0xc]
test edx, edx
js 0x417290
lea edx, [ebx + 1]
add eax, 0x30
jmp 0x4170c6
cmp edx, dword [esp + 0x10]
ja 0x417260
mov ebx, dword [esp + 0x1c]
test ebx, ebx
jne 0x417260
mov ecx, dword [esp + 0xc]
mov ebx, edx
mov ecx, dword [ecx + 0xc]
test ecx, ecx
jle 0x417266
nop
lea esi, [esi]
lea ebx, [edx + 1]
mov byte [edx], 0x2e
cmp edi, 0
ja 0x417270
cmp esi, 1
jbe 0x417287
lea edx, [ebp - 1]
shrd esi, edi, 1
shr edi, 1
mov ebp, edx
mov ecx, esi
lea edx, [ebp - 1]
xor ecx, 1
or ecx, edi
jne 0x417273
xor esi, esi
xor edi, edi
jmp 0x4170ab
mov edx, ebx
jmp 0x4170c8
mov dword [ebx + 8], 0xffffffff
test byte [esp + 0x18], 0x80
jne 0x4171b0
test dword [esp + 0x18], 0x100
jne 0x41742b
test byte [esp + 0x18], 0x40
jne 0x417450
mov edx, ebx
mov eax, 0x30
call fcn.00415e00
mov eax, dword [ebx + 4]
mov edx, ebx
and eax, 0x20
or eax, 0x58
call fcn.00415e00
mov eax, dword [ebx + 8]
test eax, eax
jle 0x417319
test byte [ebx + 5], 2
je 0x417319
sub eax, 1
mov dword [ebx + 8], eax
lea esi, [esi]
mov edx, ebx
mov eax, 0x30
call fcn.00415e00
mov eax, dword [ebx + 8]
lea edx, [eax - 1]
test eax, eax
mov dword [ebx + 8], edx
jg 0x417300
mov esi, dword [esp + 0x10]
cmp dword [esp + 0x14], esi
jbe 0x41737c
mov esi, dword [esp + 0x14]
mov ebp, dword [esp + 0x10]
jmp 0x417354
movzx eax, word [ebx + 0x1c]
test ax, ax
mov word [esp + 0x26], ax
je 0x417350
lea eax, [esp + 0x26]
mov ecx, ebx
mov edx, 1
call fcn.00415e60
nop
cmp esi, ebp
je 0x41737c
sub esi, 1
movsx eax, byte [esi]
cmp eax, 0x2e
je 0x4173c0
cmp eax, 0x2c
je 0x417330
mov edx, ebx
call fcn.00415e00
jmp 0x417350
mov edx, ebx
mov eax, 0x30
call fcn.00415e00
mov eax, dword [ebx + 0xc]
lea edx, [eax - 1]
test eax, eax
mov dword [ebx + 0xc], edx
jg 0x417370
mov eax, dword [ebx + 4]
mov edx, ebx
and eax, 0x20
or eax, 0x50
call fcn.00415e00
mov eax, dword [esp + 0xc]
add dword [ebx + 8], edi
mov ecx, ebx
or dword [ebx + 4], 0x1c0
cdq
call fcn.00416600
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, ebx
call fcn.00416100
jmp 0x417350
movsx eax, bp
mov edi, 2
mov dword [esp + 0xc], eax
jmp 0x4172a7
mov eax, dword [ebx + 0xc]
xor esi, esi
xor edi, edi
xor ebp, ebp
cmp eax, 0xe
mov dword [esp + 0xc], eax
jbe 0x416ff0
mov eax, dword [ebx + 4]
mov dword [esp + 0x18], eax
lea eax, [esp + 0x38]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0xc]
test eax, eax
jle 0x4174b5
lea eax, [esp + 0x39]
mov byte [esp + 0x38], 0x2e
lea edi, [eax + 1]
mov byte [eax], 0x30
mov dword [esp + 0x14], edi
jmp 0x4170e2
mov dword [ebx + 8], eax
jmp 0x4172a7
mov edx, ebx
mov eax, 0x2b
call fcn.00415e00
jmp 0x4172cb
mov eax, edi
or eax, esi
jne 0x417055
jmp 0x4173f0
mov edx, ebx
mov eax, 0x20
call fcn.00415e00
jmp 0x4172cb
add ebp, 1
jmp 0x417035
fstp st(0)
mov ecx, ebx
mov edx, 0x4ae400
xor eax, eax
call fcn.00416060
jmp 0x4173af
mov ecx, ebx
mov edx, 0x4ae404
mov eax, esi
call fcn.00416060
jmp 0x4173af
mov edi, 2
jmp 0x41715c
mov eax, dword [ebx + 0xc]
mov dword [esp + 0xc], eax
jmp 0x4173ff
mov esi, eax
mov edi, edx
mov ebp, 0xffffc002
jmp 0x417205
test dword [esp + 0x18], 0x800
mov eax, dword [esp + 0x10]
je 0x417414
jmp 0x41740b