Function at 0x4f59f0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, eax
push edi
push esi
push ebx
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 0x4f5e7a
movzx ebx, word [esp + 0x30]
mov esi, ebx
and esi, 0x8000
jne 0x4f5be1
fxam
wait
fnstsw ax
fstp st(0)
and ax, 0x4500
cmp ax, 0x500
je 0x4f5e8c
and bx, 0x7fff
je 0x4f5c64
mov eax, dword [esp + 0x28]
sub bx, 0x3fff
mov edx, dword [esp + 0x2c]
mov edi, dword [ebp + 0xc]
cmp edi, 0xe
mov dword [esp + 0xc], edi
jbe 0x4f5bf6
mov edi, edx
or edi, eax
je 0x4f5e9f
lea edi, [esp + 0x38]
mov dword [esp + 0x10], edi
mov esi, edi
mov dword [esp + 0xc], ebp
nop
mov ebp, eax
mov ecx, eax
and ebp, 0xf
mov edi, edx
xor ecx, ebp
or edi, ecx
je 0x4f5cc0
mov edi, dword [esp + 0xc]
mov ecx, dword [edi + 0xc]
test ecx, ecx
jle 0x4f5aa8
mov edi, dword [esp + 0xc]
sub ecx, 1
mov dword [edi + 0xc], ecx
shrd eax, edx, 4
mov edi, esi
shr edx, 4
test ebp, ebp
jne 0x4f5c97
cmp edi, dword [esp + 0x10]
ja 0x4f5acc
mov ecx, dword [esp + 0xc]
mov esi, edi
mov ecx, dword [ecx + 0xc]
test ecx, ecx
js 0x4f5ad4
lea esi, [edi + 1]
lea ecx, [ebp + 0x30]
mov byte [edi], cl
mov edi, edx
or edi, eax
jne 0x4f5a80
cmp esi, dword [esp + 0x10]
mov edi, esi
mov ebp, dword [esp + 0xc]
je 0x4f5ed7
mov eax, dword [ebp + 4]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 8]
test eax, eax
mov dword [esp + 0x18], eax
jle 0x4f5e29
mov edx, dword [ebp + 0xc]
mov eax, edi
movsx ebx, bx
sub eax, dword [esp + 0x10]
mov dword [esp + 0x14], ebx
test edx, edx
lea ecx, [eax + edx]
mov edx, dword [esp + 0xc]
cmovg eax, ecx
and edx, 0x1c0
cmp edx, 1
sbb edx, edx
lea esi, [eax + edx + 6]
mov eax, ebx
mov edx, 0x66666667
imul edx
mov eax, ebx
sar eax, 0x1f
sar edx, 2
sub edx, eax
mov ecx, edx
je 0x4f5eca
mov ebx, 2
nop
lea esi, [esi]
mov eax, 0x66666667
add esi, 1
imul ecx
add ebx, 1
sar ecx, 0x1f
sar edx, 2
sub edx, ecx
mov ecx, edx
jne 0x4f5b50
movsx eax, bx
mov dword [esp + 0x1c], eax
cmp dword [esp + 0x18], esi
jle 0x4f5d10
mov eax, dword [esp + 0x18]
sub eax, esi
test dword [esp + 0xc], 0x600
jne 0x4f5e48
lea edx, [eax - 1]
test eax, eax
mov dword [ebp + 8], edx
jle 0x4f5d17
lea esi, [esi]
mov edx, ebp
mov eax, 0x20
call fcn.004f4ac0
mov eax, dword [ebp + 8]
lea edx, [eax - 1]
test eax, eax
mov dword [ebp + 8], edx
jg 0x4f5ba0
mov eax, dword [ebp + 4]
mov dword [esp + 0xc], eax
test byte [esp + 0xc], 0x80
je 0x4f5d22
nop
lea esi, [esi]
mov edx, ebp
mov eax, 0x2d
call fcn.004f4ac0
jmp 0x4f5d3b
or dword [ebp + 4], 0x80
jmp 0x4f5a29
shld edx, eax, 1
add eax, eax
test edx, edx
jns 0x4f5bf0
shrd eax, edx, 1
mov esi, eax
mov eax, 0xe
sub eax, dword [esp + 0xc]
shr edx, 1
mov edi, edx
xor edx, edx
lea ecx, [eax*4]
mov eax, 4
shld edx, eax, cl
shl eax, cl
test cl, 0x20
je 0x4f5c29
mov edx, eax
xor eax, eax
add esi, eax
adc edi, edx
test edi, edi
js 0x4f5e72
shld edi, esi, 1
add esi, esi
mov eax, 0xf
mov edx, edi
sub eax, dword [esp + 0xc]
lea ecx, [eax*4]
mov eax, esi
shr edx, cl
xor esi, esi
shrd eax, edi, cl
and ecx, 0x20
cmovne eax, edx
cmovne edx, esi
jmp 0x4f5a70
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x28]
mov ebx, edx
or ebx, eax
je 0x4f5e3d
test edx, edx
js 0x4f5ee0
mov ecx, 0xffffc001
shld edx, eax, 1
mov ebx, ecx
add eax, eax
sub ecx, 1
test edx, edx
jns 0x4f5c83
jmp 0x4f5a56
cmp ebp, 9
lea esi, [edi + 1]
jbe 0x4f5acf
lea ecx, [ebp + 0x37]
mov ebp, dword [esp + 0xc]
mov ebp, dword [ebp + 4]
mov dword [esp + 0x14], ebp
movzx ebp, byte [esp + 0x14]
and ebp, 0x20
or ecx, ebp
jmp 0x4f5ad2
cmp esi, dword [esp + 0x10]
ja 0x4f5ce0
mov edi, dword [esp + 0xc]
test byte [edi + 5], 8
jne 0x4f5ce0
mov ecx, dword [esp + 0xc]
mov edi, esi
mov ecx, dword [ecx + 0xc]
test ecx, ecx
jle 0x4f5ce6
lea esi, [esi]
lea edi, [esi + 1]
mov byte [esi], 0x2e
mov ecx, eax
xor ecx, 1
or ecx, edx
je 0x4f5d06
lea ecx, [ebx - 1]
shrd eax, edx, 1
mov ebx, ecx
mov esi, eax
shr edx, 1
xor esi, 1
or esi, edx
lea ecx, [ebx - 1]
jne 0x4f5cf2
xor eax, eax
xor edx, edx
jmp 0x4f5ab1
mov dword [ebp + 8], 0xffffffff
test byte [esp + 0xc], 0x80
jne 0x4f5bd0
test dword [esp + 0xc], 0x100
jne 0x4f5e50
test byte [esp + 0xc], 0x40
jne 0x4f5e61
mov edx, ebp
mov eax, 0x30
call fcn.004f4ac0
mov eax, dword [ebp + 4]
mov edx, ebp
and eax, 0x20
or eax, 0x58
call fcn.004f4ac0
mov eax, dword [ebp + 8]
test eax, eax
jle 0x4f5d89
test byte [ebp + 5], 2
je 0x4f5d89
sub eax, 1
mov dword [ebp + 8], eax
lea esi, [esi]
mov edx, ebp
mov eax, 0x30
call fcn.004f4ac0
mov eax, dword [ebp + 8]
lea edx, [eax - 1]
test eax, eax
mov dword [ebp + 8], edx
jg 0x4f5d70
cmp edi, dword [esp + 0x10]
mov ebx, dword [esp + 0x10]
ja 0x4f5db7
jmp 0x4f5dde
movzx eax, word [ebp + 0x1c]
test ax, ax
mov word [esp + 0x26], ax
je 0x4f5db3
mov ecx, ebp
mov edx, 1
lea eax, [esp + 0x26]
call fcn.004f4dc0
cmp edi, ebx
je 0x4f5dde
sub edi, 1
movsx eax, byte [edi]
cmp eax, 0x2e
je 0x4f5e20
cmp eax, 0x2c
je 0x4f5d95
mov edx, ebp
call fcn.004f4ac0
nop
jmp 0x4f5db3
mov edx, ebp
mov eax, 0x30
call fcn.004f4ac0
mov eax, dword [ebp + 0xc]
lea edx, [eax - 1]
test eax, eax
mov dword [ebp + 0xc], edx
jg 0x4f5dd2
mov eax, dword [ebp + 4]
mov edx, ebp
and eax, 0x20
or eax, 0x50
call fcn.004f4ac0
mov eax, dword [esp + 0x1c]
mov ecx, ebp
add dword [ebp + 8], eax
mov eax, dword [esp + 0x14]
or dword [ebp + 4], 0x1c0
cdq
call fcn.004f5420
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, ebp
call fcn.004f4d30
jmp 0x4f5db3
movsx eax, bx
mov dword [esp + 0x1c], 2
mov dword [esp + 0x14], eax
jmp 0x4f5d17
xor ebx, ebx
xor eax, eax
xor edx, edx
jmp 0x4f5a56
mov dword [ebp + 8], eax
jmp 0x4f5d17
mov edx, ebp
mov eax, 0x2b
call fcn.004f4ac0
jmp 0x4f5d3b
mov edx, ebp
mov eax, 0x20
call fcn.004f4ac0
jmp 0x4f5d3b
add ebx, 1
jmp 0x4f5c3b
fstp st(0)
mov ecx, ebp
mov edx, 0x53774f
xor eax, eax
call fcn.004f4ca0
jmp 0x4f5e15
mov ecx, ebp
mov edx, 0x537753
mov eax, esi
call fcn.004f4ca0
jmp 0x4f5e15
lea eax, [esp + 0x38]
mov dword [esp + 0x10], eax
mov edx, dword [esp + 0xc]
mov eax, dword [ebp + 4]
test edx, edx
jle 0x4f5eea
mov dword [esp + 0xc], eax
mov byte [esp + 0x38], 0x2e
lea eax, [esp + 0x39]
lea edi, [eax + 1]
mov byte [eax], 0x30
jmp 0x4f5af1
mov dword [esp + 0x1c], 2
jmp 0x4f5b70
mov eax, dword [ebp + 0xc]
mov dword [esp + 0xc], eax
jmp 0x4f5ea7
mov ebx, 0xffffc002
jmp 0x4f5a56
mov edx, eax
and dh, 8
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x10]
je 0x4f5ebf
jmp 0x4f5eb6