Function at 0x5b3820
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 0x5b3d2b
movzx edx, word [esp + 0x30]
test dx, dx
js 0x5b3c90
fxam
wait
fnstsw ax
fstp st(0)
and ax, 0x4500
cmp ax, 0x500
je 0x5b3d40
mov eax, edx
and ax, 0x7fff
je 0x5b3a30
mov edx, dword [ebx + 0xc]
mov edi, dword [esp + 0x28]
sub ax, 0x3fff
mov ebp, dword [esp + 0x2c]
cmp edx, 0xe
mov dword [esp], edi
mov dword [esp + 4], ebp
ja 0x5b3cc6
test ebp, ebp
js 0x5b38b1
nop
lea esi, [esi]
shld ebp, edi, 1
add edi, edi
test ebp, ebp
jns 0x5b38a0
mov dword [esp], edi
mov dword [esp + 4], ebp
mov ecx, 0xe
mov esi, 4
mov edi, 0
sub ecx, edx
xor ebp, ebp
shl ecx, 2
shld edi, esi, cl
shl esi, cl
test cl, 0x20
cmovne edi, esi
cmovne esi, ebp
mov dword [esp + 8], esi
mov dword [esp + 0xc], edi
mov esi, dword [esp]
mov edi, dword [esp + 4]
shrd esi, edi, 1
shr edi, 1
add esi, dword [esp + 8]
adc edi, dword [esp + 0xc]
test edi, edi
js 0x5b3d23
shld edi, esi, 1
add esi, esi
mov ecx, 0xf
xor ebp, ebp
sub ecx, edx
shl ecx, 2
shrd esi, edi, cl
shr edi, cl
test cl, 0x20
cmovne esi, edi
cmovne edi, ebp
mov dword [esp], esi
mov dword [esp + 4], edi
mov edi, dword [ebx + 4]
lea esi, [esp + 0x38]
mov ebp, dword [esp + 4]
mov dword [esp + 8], ebx
mov dword [esp + 0x10], esi
mov ecx, edi
mov dword [esp + 0x18], edi
and ecx, 0x800
mov dword [esp + 0x1c], ecx
mov ecx, edi
mov edi, dword [esp]
and ecx, 0x20
mov byte [esp + 0x17], cl
jmp 0x5b399e
mov ebx, dword [esp + 8]
mov ecx, dword [ebx + 0xc]
test ecx, ecx
jle 0x5b3967
mov ebx, dword [esp + 8]
sub ecx, 1
mov dword [ebx + 0xc], ecx
shrd edi, ebp, 4
shr ebp, 4
test edx, edx
mov dword [esp], esi
je 0x5b3a02
mov esi, dword [esp]
add esi, 1
cmp edx, 9
jle 0x5b3a23
add edx, 0x37
or dl, byte [esp + 0x17]
mov ecx, dword [esp]
mov byte [ecx], dl
mov ecx, ebp
or ecx, edi
je 0x5b3a90
mov edx, edi
and edx, 0xf
cmp edi, edx
jne 0x5b3952
cmp esi, dword [esp + 0x10]
ja 0x5b39c3
mov ebx, dword [esp + 0x1c]
test ebx, ebx
jne 0x5b39c3
mov ecx, dword [esp + 8]
mov dword [esp], esi
mov ecx, dword [ecx + 0xc]
test ecx, ecx
jle 0x5b39cc
lea ecx, [esi + 1]
mov byte [esi], 0x2e
mov dword [esp], ecx
cmp ebp, 0
ja 0x5b39d6
cmp edi, 1
jbe 0x5b39f6
lea ecx, [eax - 1]
lea esi, [esi]
shrd edi, ebp, 1
shr ebp, 1
mov eax, ecx
mov ebx, edi
mov esi, ebp
lea ecx, [eax - 1]
xor ebx, 1
or esi, ebx
jne 0x5b39e0
xor edi, edi
xor ebp, ebp
test edx, edx
jne 0x5b3979
mov ecx, dword [esp + 0x10]
cmp dword [esp], ecx
ja 0x5b3a1d
mov esi, dword [esp + 8]
mov ecx, dword [esi + 0xc]
mov esi, dword [esp]
test ecx, ecx
js 0x5b3994
mov esi, dword [esp]
add esi, 1
add edx, 0x30
jmp 0x5b398f
mov ebp, dword [esp + 0x2c]
mov edi, dword [esp + 0x28]
mov ecx, ebp
mov dword [esp], edi
mov dword [esp + 4], ebp
or ecx, edi
je 0x5b3caa
test ebp, ebp
js 0x5b3d62
mov edx, 0xffffc001
lea esi, [esi]
lea edi, [edi]
shld ebp, edi, 1
mov eax, edx
add edi, edi
sub edx, 1
test ebp, ebp
jns 0x5b3a60
mov dword [esp], edi
mov dword [esp + 4], ebp
mov edx, dword [ebx + 0xc]
cmp edx, 0xe
ja 0x5b3921
jmp 0x5b38b1
cmp esi, dword [esp + 0x10]
mov ebx, dword [esp + 8]
je 0x5b3ce6
mov edi, dword [ebx + 8]
test edi, edi
mov dword [esp + 8], edi
jle 0x5b3c9c
cwde
mov edx, esi
sub edx, dword [esp + 0x10]
mov edi, eax
mov eax, dword [ebx + 0xc]
mov dword [esp], edi
lea ecx, [edx + eax]
test eax, eax
cmovg edx, ecx
xor eax, eax
test dword [esp + 0x18], 0x1c0
mov ecx, 0x66666667
setne al
lea ebp, [edx + eax + 5]
mov eax, edi
imul ecx
mov eax, edi
sar eax, 0x1f
mov ecx, edx
sar ecx, 2
sub ecx, eax
je 0x5b3d58
mov edi, 2
mov eax, 0x66666667
add ebp, 1
add edi, 1
imul ecx
sar ecx, 0x1f
sar edx, 2
sub edx, ecx
mov ecx, edx
jne 0x5b3af5
movsx edi, di
mov eax, dword [esp + 8]
cmp eax, ebp
jle 0x5b3b70
sub eax, ebp
test dword [esp + 0x18], 0x600
jne 0x5b3cbe
sub eax, 1
mov dword [ebx + 8], eax
nop
mov edx, ebx
mov eax, 0x20
call fcn.005b25d0
mov eax, dword [ebx + 8]
lea edx, [eax - 1]
test eax, eax
mov dword [ebx + 8], edx
jg 0x5b3b30
mov eax, dword [ebx + 4]
mov dword [esp + 0x18], eax
test byte [esp + 0x18], 0x80
je 0x5b3b7e
mov esi, esi
lea edi, [edi]
mov edx, ebx
mov eax, 0x2d
call fcn.005b25d0
jmp 0x5b3b97
mov dword [ebx + 8], 0xffffffff
test byte [esp + 0x18], 0x80
jne 0x5b3b60
test dword [esp + 0x18], 0x100
jne 0x5b3d01
test byte [esp + 0x18], 0x40
jne 0x5b3d12
mov edx, ebx
mov eax, 0x30
call fcn.005b25d0
mov eax, dword [ebx + 4]
mov edx, ebx
and eax, 0x20
or eax, 0x58
call fcn.005b25d0
mov eax, dword [ebx + 8]
test eax, eax
jle 0x5b3be9
test byte [ebx + 5], 2
je 0x5b3be9
sub eax, 1
mov dword [ebx + 8], eax
lea esi, [esi]
lea edi, [edi]
mov edx, ebx
mov eax, 0x30
call fcn.005b25d0
mov eax, dword [ebx + 8]
lea edx, [eax - 1]
test eax, eax
mov dword [ebx + 8], edx
jg 0x5b3bd0
cmp esi, dword [esp + 0x10]
mov ebp, dword [esp + 0x10]
ja 0x5b3c17
jmp 0x5b3c3c
movzx eax, word [ebx + 0x1c]
test ax, ax
mov word [esp + 0x26], ax
je 0x5b3c13
lea eax, [esp + 0x26]
mov ecx, ebx
mov edx, 1
call fcn.005b2630
cmp esi, ebp
je 0x5b3c3c
sub esi, 1
movsx eax, byte [esi]
cmp eax, 0x2e
je 0x5b3c80
cmp eax, 0x2c
je 0x5b3bf5
mov edx, ebx
call fcn.005b25d0
jmp 0x5b3c13
mov edx, ebx
mov eax, 0x30
call fcn.005b25d0
mov eax, dword [ebx + 0xc]
lea edx, [eax - 1]
test eax, eax
mov dword [ebx + 0xc], edx
jg 0x5b3c30
mov eax, dword [ebx + 4]
mov edx, ebx
and eax, 0x20
or eax, 0x50
call fcn.005b25d0
mov eax, dword [esp]
add dword [ebx + 8], edi
mov ecx, ebx
or dword [ebx + 4], 0x1c0
cdq
call fcn.005b2e60
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, ebx
call fcn.005b2930
jmp 0x5b3c13
or dword [ebx + 4], 0x80
jmp 0x5b3854
cwde
mov edi, 2
mov dword [esp], eax
jmp 0x5b3b77
mov edx, dword [ebx + 0xc]
cmp edx, 0xe
ja 0x5b3cd7
mov edi, dword [esp]
mov ebp, dword [esp + 4]
jmp 0x5b38a0
mov dword [ebx + 8], eax
jmp 0x5b3b77
mov ebp, dword [esp + 4]
mov edi, dword [esp]
mov ecx, ebp
or ecx, edi
jne 0x5b3921
mov edi, dword [ebx + 4]
mov dword [esp + 0x18], edi
lea edi, [esp + 0x38]
mov dword [esp + 0x10], edi
mov edx, dword [ebx + 0xc]
test edx, edx
jle 0x5b3d6c
lea edx, [esp + 0x39]
mov byte [esp + 0x38], 0x2e
lea esi, [edx + 1]
mov byte [edx], 0x30
jmp 0x5b3a9e
mov edx, ebx
mov eax, 0x2b
call fcn.005b25d0
jmp 0x5b3b97
mov edx, ebx
mov eax, 0x20
call fcn.005b25d0
jmp 0x5b3b97
add eax, 1
jmp 0x5b3900
fstp st(0)
mov ecx, ebx
mov edx, 0x718e6e
xor eax, eax
call fcn.005b2890
jmp 0x5b3c6e
mov eax, edx
mov ecx, ebx
mov edx, 0x718e72
and eax, 0x8000
call fcn.005b2890
jmp 0x5b3c6e
mov edi, 2
jmp 0x5b3b11
mov eax, 0xffffc002
jmp 0x5b3a76
test dword [esp + 0x18], 0x800
mov edx, dword [esp + 0x10]
je 0x5b3cf6
jmp 0x5b3ced