Function at 0x41f530
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov ebx, eax
and esp, 0xfffffff0
sub esp, 0x70
fld xword [ebp + 8]
fxam
wait
fnstsw ax
mov edi, dword [ebx + 4]
and ax, 0x4500
mov dword [esp + 0x28], edi
cmp ax, 0x100
je 0x41f888
fld st(0)
fstp xword [esp + 0x40]
movzx edx, word [esp + 0x48]
test dx, dx
js 0x41f6f8
fxam
wait
fnstsw ax
and ax, 0x4500
cmp ax, 0x500
je 0x41fdb0
fstp xword [esp + 0x30]
mov eax, dword [ebx + 0xc]
and dx, 0x7fff
mov esi, dword [esp + 0x30]
mov edi, dword [esp + 0x34]
mov dword [esp + 0x24], eax
mov word [esp + 0x20], dx
jne 0x41f780
mov ecx, edi
or ecx, esi
jne 0x41f8e8
cmp eax, 0xe
jbe 0x41f798
lea eax, [esp + 0x58]
mov dword [esp + 0x2c], eax
mov edx, dword [esp + 0x24]
test edx, edx
jle 0x41fe20
mov byte [esp + 0x58], 0x2e
lea eax, [esp + 0x59]
lea edi, [eax + 1]
mov byte [eax], 0x30
mov dword [esp + 0x1c], edi
mov eax, dword [ebx + 8]
mov dword [esp + 0x14], eax
test eax, eax
jle 0x41f9d8
mov edi, dword [esp + 0x2c]
mov eax, dword [esp + 0x1c]
mov edx, dword [ebx + 0xc]
movsx esi, word [esp + 0x20]
sub eax, edi
lea ecx, [eax + edx]
test edx, edx
mov edx, dword [esp + 0x28]
mov dword [esp + 0x24], esi
cmovg eax, ecx
and edx, 0x1c0
cmp edx, 1
mov edi, eax
mov edx, 0x66666667
mov eax, esi
sbb edi, 0xfffffffa
imul edx
mov eax, esi
sar eax, 0x1f
mov dword [esp + 0x20], edi
sar edx, 2
mov ecx, edx
sub ecx, eax
je 0x41fe95
mov esi, 0x66666667
lea esi, [esi]
mov eax, ecx
add edi, 1
imul esi
mov eax, ecx
sar eax, 0x1f
sar edx, 2
mov ecx, edx
sub ecx, eax
jne 0x41f648
mov eax, edi
sub ax, word [esp + 0x20]
add eax, 2
cwde
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x14]
cmp eax, edi
jle 0x41fcc8
sub eax, edi
test dword [esp + 0x28], 0x600
jne 0x41fccd
sub eax, 1
mov esi, dword [esp + 0x28]
mov dword [ebx + 8], eax
jmp 0x41f6c4
mov edx, dword [ebx + 0x20]
mov byte [eax + edx], 0x20
mov esi, dword [ebx + 4]
mov edi, dword [ebx + 8]
mov edx, dword [ebx + 0x20]
mov ecx, esi
and ecx, 0x4000
add edx, 1
lea eax, [edi - 1]
mov dword [ebx + 0x20], edx
mov dword [ebx + 8], eax
test edi, edi
jle 0x41fe10
mov ecx, esi
and ecx, 0x4000
jne 0x41f6d8
mov edx, dword [ebx + 0x20]
mov edi, eax
cmp dword [ebx + 0x24], edx
jle 0x41f6b0
and esi, 0x2000
mov eax, dword [ebx]
je 0x41f698
mov dword [esp + 4], eax
mov dword [esp], 0x20
call sub.msvcrt.dll_fputc
jmp 0x41f69f
or dword [esp + 0x28], 0x80
mov eax, dword [esp + 0x28]
mov dword [ebx + 4], eax
fxam
wait
fnstsw ax
and ax, 0x4500
cmp ax, 0x500
jne 0x41f582
fstp st(0)
lea eax, [esp + 0x58]
mov dword [ebx + 0xc], 0xffffffff
lea edx, [esp + 0x59]
mov byte [esp + 0x58], 0x2d
mov dword [esp + 0x2c], eax
movzx eax, byte [esp + 0x28]
add edx, 3
pinsrw xmm0, word [0x51bb32], 0
and eax, 0x20
movzx ecx, al
mov ch, al
or eax, 0x46
movd xmm1, ecx
mov byte [edx - 1], al
mov eax, dword [esp + 0x2c]
mov ecx, ebx
por xmm1, xmm0
pextrw word [edx - 3], xmm1, 0
sub edx, eax
call fcn.0041d1a0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
sub word [esp + 0x20], 0x3fff
cmp dword [esp + 0x24], 0xe
jbe 0x41f79e
jmp 0x41fd98
shld edi, esi, 1
add esi, esi
test edi, edi
jns 0x41f798
mov eax, dword [esp + 0x24]
mov ecx, 0xe
xor edx, edx
sub ecx, eax
mov eax, 4
shl ecx, 2
shld edx, eax, cl
shl eax, cl
test cl, 0x20
je 0x41f7c5
mov edx, eax
xor eax, eax
shrd esi, edi, 1
shr edi, 1
add eax, esi
adc edx, edi
test edx, edx
js 0x41f920
shld edx, eax, 1
add eax, eax
mov edi, dword [esp + 0x24]
mov ecx, 0xf
xor esi, esi
sub ecx, edi
shl ecx, 2
shrd eax, edx, cl
shr edx, cl
test cl, 0x20
cmovne eax, edx
cmovne edx, esi
mov esi, eax
mov edi, edx
movzx eax, byte [esp + 0x28]
lea ecx, [esp + 0x58]
mov dword [esp + 0x24], ebx
mov dword [esp + 0x2c], ecx
mov ebx, ecx
and eax, 0x20
mov byte [esp + 0x1c], al
jmp 0x41f845
cmp dword [esp + 0x2c], ebx
jb 0x41f831
mov ecx, dword [esp + 0x24]
mov ecx, dword [ecx + 0xc]
test ecx, ecx
js 0x41f83b
add eax, 0x30
mov edx, ebx
mov byte [edx], al
add ebx, 1
mov eax, edi
or eax, esi
je 0x41f9b0
mov ecx, esi
mov eax, esi
mov edx, edi
and ecx, 0xfffffff0
and eax, 0xf
or edx, ecx
je 0x41f948
mov ecx, dword [esp + 0x24]
shrd esi, edi, 4
shr edi, 4
mov edx, dword [ecx + 0xc]
test edx, edx
jle 0x41f871
sub edx, 1
mov dword [ecx + 0xc], edx
test eax, eax
je 0x41f820
cmp eax, 9
jbe 0x41f831
add eax, 0x37
mov edx, ebx
or al, byte [esp + 0x1c]
jmp 0x41f836
fstp st(0)
mov eax, edi
mov dword [ebx + 0xc], 0xffffffff
test ah, 1
je 0x41f930
mov eax, 0x2b
lea edi, [esp + 0x58]
mov byte [esp + 0x58], al
lea eax, [esp + 0x59]
mov dword [esp + 0x2c], edi
movzx edx, byte [esp + 0x28]
and edx, 0x20
mov ecx, edx
or edx, 0x41
or ecx, 0x4e
mov byte [eax + 1], dl
lea edx, [eax + 3]
mov byte [eax], cl
mov byte [eax + 2], cl
mov eax, dword [esp + 0x2c]
mov ecx, ebx
sub edx, eax
call fcn.0041d1a0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
test edi, edi
js 0x41fec1
mov eax, 0xffffc001
lea esi, [esi]
shld edi, esi, 1
mov edx, eax
add esi, esi
sub eax, 1
test edi, edi
jns 0x41f8f8
cmp dword [esp + 0x24], 0xe
mov word [esp + 0x20], dx
ja 0x41f7ff
jmp 0x41f7a2
add word [esp + 0x20], 1
jmp 0x41f7dd
test al, 0x40
je 0x41fe4c
mov eax, 0x20
jmp 0x41f8a1
cmp dword [esp + 0x2c], ebx
jb 0x41f968
test dword [esp + 0x28], 0x800
jne 0x41f968
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx + 0xc]
test edx, edx
jle 0x41f96e
lea esi, [esi]
nop
mov byte [ebx], 0x2e
add ebx, 1
movzx edx, word [esp + 0x20]
mov ecx, esi
xor ecx, 1
sub edx, 1
or ecx, edi
je 0x41f9a5
mov dword [esp + 0x20], eax
lea esi, [esi]
nop
shrd esi, edi, 1
shr edi, 1
mov ecx, edx
sub edx, 1
mov eax, esi
xor eax, 1
or eax, edi
jne 0x41f988
mov eax, dword [esp + 0x20]
mov word [esp + 0x20], cx
xor esi, esi
xor edi, edi
jmp 0x41f875
mov edi, dword [esp + 0x2c]
mov eax, ebx
mov dword [esp + 0x1c], ebx
mov ebx, dword [esp + 0x24]
cmp eax, edi
jne 0x41f5df
mov eax, dword [ebx + 0xc]
mov dword [esp + 0x24], eax
jmp 0x41f5c0
movsx eax, word [esp + 0x20]
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x18], 2
mov dword [esp + 0x24], eax
and ecx, 0x4000
test byte [esp + 0x28], 0x80
jne 0x41fc88
test dword [esp + 0x28], 0x100
jne 0x41fd68
test byte [esp + 0x28], 0x40
jne 0x41fde8
test ecx, ecx
je 0x41fca2
mov eax, dword [ebx]
test dword [esp + 0x28], 0x2000
jne 0x41fcf8
mov edx, dword [ebx + 0x20]
mov byte [eax + edx], 0x30
mov eax, dword [ebx + 4]
mov edx, eax
mov dword [esp + 0x28], eax
mov eax, dword [ebx + 0x20]
and edx, 0x4000
add eax, 1
mov dword [ebx + 0x20], eax
test edx, edx
je 0x41fcb4
mov edi, dword [esp + 0x28]
mov ecx, dword [ebx]
mov edx, edi
and edx, 0x20
or edx, 0x58
and edi, 0x2000
jne 0x41fce0
mov byte [ecx + eax], dl
mov eax, dword [ebx + 0x20]
mov edx, dword [ebx + 8]
add eax, 1
mov dword [ebx + 0x20], eax
test edx, edx
jle 0x41fb00
mov esi, dword [ebx + 4]
test esi, 0x200
je 0x41fb00
sub edx, 1
mov dword [ebx + 8], edx
jmp 0x41fabd
mov byte [edx + eax], 0x30
mov ecx, dword [ebx + 8]
mov eax, dword [ebx + 0x20]
add eax, 1
lea edx, [ecx - 1]
mov dword [ebx + 0x20], eax
mov dword [ebx + 8], edx
test ecx, ecx
jle 0x41fb00
mov esi, dword [ebx + 4]
test esi, 0x4000
jne 0x41facc
mov ecx, edx
cmp dword [ebx + 0x24], eax
jle 0x41faaa
and esi, 0x2000
mov edx, dword [ebx]
je 0x41faa0
mov dword [esp + 4], edx
mov dword [esp], 0x30
call sub.msvcrt.dll_fputc
mov ecx, dword [ebx + 8]
mov eax, dword [ebx + 0x20]
lea edx, [ecx - 1]
add eax, 1
mov dword [ebx + 0x20], eax
mov dword [ebx + 8], edx
test ecx, ecx
jg 0x41faba
lea esi, [esi]
mov edi, dword [esp + 0x1c]
mov esi, edi
cmp dword [esp + 0x2c], edi
jb 0x41fb2a
jmp 0x41fb79
movzx eax, word [ebx + 0x1c]
mov word [esp + 0x56], ax
test ax, ax
jne 0x41fbf8
mov eax, dword [esp + 0x2c]
cmp esi, eax
je 0x41fb79
movsx edx, byte [esi - 1]
sub esi, 1
mov eax, edx
cmp dl, 0x2e
je 0x41fbe8
cmp edx, 0x2c
je 0x41fb10
mov edi, dword [ebx + 4]
test edi, 0x4000
jne 0x41fb54
mov ecx, dword [ebx + 0x20]
cmp dword [ebx + 0x24], ecx
jle 0x41fb6b
and edi, 0x2000
mov ecx, dword [ebx]
jne 0x41fc70
mov edx, dword [ebx + 0x20]
mov byte [ecx + edx], al
mov ecx, dword [ebx + 0x20]
mov eax, dword [esp + 0x2c]
add ecx, 1
mov dword [ebx + 0x20], ecx
cmp esi, eax
jne 0x41fb2a
mov edx, dword [ebx + 0xc]
mov eax, dword [ebx + 4]
lea esi, [edx - 1]
mov dword [ebx + 0xc], esi
test edx, edx
jg 0x41fbb8
jmp 0x41fc0d
mov eax, dword [ebx + 0x20]
mov byte [edx + eax], 0x30
mov eax, dword [ebx + 4]
mov ecx, dword [ebx + 0xc]
mov edx, dword [ebx + 0x20]
mov edi, eax
and edi, 0x4000
add edx, 1
lea esi, [ecx - 1]
mov dword [ebx + 0x20], edx
mov dword [ebx + 0xc], esi
test ecx, ecx
jle 0x41fc18
mov edi, eax
and edi, 0x4000
jne 0x41fbcc
mov edx, dword [ebx + 0x20]
mov ecx, esi
cmp dword [ebx + 0x24], edx
jle 0x41fba8
mov edx, dword [ebx]
test ah, 0x20
je 0x41fb90
mov dword [esp + 4], edx
mov dword [esp], 0x30
call sub.msvcrt.dll_fputc
jmp 0x41fb97
mov eax, ebx
call fcn.0041dff0
jmp 0x41fb22
mov ecx, ebx
mov edx, 1
lea eax, [esp + 0x56]
call fcn.0041d340
jmp 0x41fb22
mov edi, eax
and edi, 0x4000
lea esi, [esi]
test edi, edi
jne 0x41fc24
mov edx, dword [ebx + 0x20]
cmp dword [ebx + 0x24], edx
jle 0x41fc43
mov edx, eax
mov ecx, dword [ebx]
and edx, 0x20
or edx, 0x50
test ah, 0x20
jne 0x41fd10
mov eax, dword [ebx + 0x20]
mov byte [ecx + eax], dl
mov eax, dword [ebx + 4]
mov edx, dword [ebx + 0x20]
mov edi, dword [esp + 0x18]
add edx, 1
add dword [ebx + 8], edi
or eax, 0x1c0
mov dword [ebx + 0x20], edx
mov ecx, ebx
mov dword [ebx + 4], eax
mov eax, dword [esp + 0x24]
lea esp, [ebp - 0xc]
pop ebx
pop esi
cdq
pop edi
pop ebp
jmp fcn.0041db30
mov dword [esp + 4], ecx
mov dword [esp], edx
call sub.msvcrt.dll_fputc
mov ecx, dword [ebx + 0x20]
jmp 0x41fb6b
test ecx, ecx
jne 0x41fd30
mov eax, dword [ebx + 0x20]
cmp dword [ebx + 0x24], eax
jg 0x41fd30
add eax, 1
mov dword [ebx + 0x20], eax
mov eax, dword [ebx + 0x20]
cmp dword [ebx + 0x24], eax
jg 0x41fa1f
add eax, 1
mov dword [ebx + 0x20], eax
cmp eax, dword [ebx + 0x24]
jge 0x41fa76
jmp 0x41fa56
mov eax, 0xffffffff
mov ecx, dword [esp + 0x28]
mov dword [ebx + 8], eax
and ecx, 0x4000
jmp 0x41f9f3
mov dword [esp + 4], ecx
mov dword [esp], edx
call sub.msvcrt.dll_fputc
mov eax, dword [ebx + 0x20]
jmp 0x41fa76
mov dword [esp + 4], eax
mov dword [esp], 0x30
call sub.msvcrt.dll_fputc
jmp 0x41fa36
mov dword [esp], edx
mov dword [esp + 4], ecx
call sub.msvcrt.dll_fputc
mov eax, dword [ebx + 4]
mov edx, dword [ebx + 0x20]
jmp 0x41fc43
mov eax, dword [ebx]
test dword [esp + 0x28], 0x2000
jne 0x41fe37
mov edx, dword [ebx + 0x20]
mov byte [eax + edx], 0x2d
mov eax, dword [ebx + 0x20]
mov edi, dword [ebx + 4]
add eax, 1
mov ecx, edi
mov dword [esp + 0x28], edi
mov dword [ebx + 0x20], eax
and ecx, 0x4000
jmp 0x41fa17
test ecx, ecx
jne 0x41fd78
mov eax, dword [ebx + 0x20]
cmp dword [ebx + 0x24], eax
jle 0x41fc9c
mov eax, dword [ebx]
test dword [esp + 0x28], 0x2000
jne 0x41fea2
mov edx, dword [ebx + 0x20]
mov byte [eax + edx], 0x2b
jmp 0x41fd47
mov eax, edi
or eax, esi
jne 0x41f7ff
jmp 0x41f5b8
fstp st(0)
mov dword [ebx + 0xc], 0xffffffff
test dword [esp + 0x28], 0x100
je 0x41fe59
mov eax, 0x2b
mov byte [esp + 0x58], al
lea eax, [esp + 0x58]
lea edx, [esp + 0x59]
mov dword [esp + 0x2c], eax
jmp 0x41f734
test ecx, ecx
je 0x41fe6f
mov eax, dword [ebx]
test dword [esp + 0x28], 0x2000
jne 0x41fe80
mov edx, dword [ebx + 0x20]
mov byte [eax + edx], 0x20
jmp 0x41fd47
mov dword [esp + 0x28], esi
jmp 0x41f9f3
mov eax, dword [esp + 0x2c]
test dword [esp + 0x28], 0x800
je 0x41f5d5
jmp 0x41f5cc
mov dword [esp + 4], eax
mov dword [esp], 0x2d
call sub.msvcrt.dll_fputc
jmp 0x41fd47
lea eax, [esp + 0x58]
mov dword [esp + 0x2c], eax
jmp 0x41f8b1
test byte [esp + 0x28], 0x40
jne 0x41feb7
lea eax, [esp + 0x58]
mov dword [esp + 0x2c], eax
mov edx, eax
jmp 0x41f734
mov eax, dword [ebx + 0x20]
cmp dword [ebx + 0x24], eax
jg 0x41fdf0
jmp 0x41fc9c
mov dword [esp + 4], eax
mov dword [esp], 0x20
call sub.msvcrt.dll_fputc
jmp 0x41fd47
mov dword [esp + 0x18], 2
jmp 0x41f66c
mov dword [esp + 4], eax
mov dword [esp], 0x2b
call sub.msvcrt.dll_fputc
jmp 0x41fd47
mov eax, 0x20
jmp 0x41fdcc
mov eax, 0xffffc002
cmp dword [esp + 0x24], 0xe
mov word [esp + 0x20], ax
jbe 0x41f7a2
jmp 0x41f7ff