Function at 0x403710
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x70
mov dword [esp + 0x10], edx
fld qword [ebp + 0x10]
fst qword [esp + 0x50]
mov edi, dword [esp + 0x54]
mov eax, edi
shr eax, 0x14
fld st(0)
fchs
test edi, edi
js 0x40373c
fstp st(0)
fld st(0)
mov esi, dword [ebp + 8]
mov edx, dword [esp + 0x50]
and eax, 0x7ff
mov dword [esp + 0x2c], edi
je 0x40378c
fstp st(1)
mov dword [esp + 0x1c], ecx
cmp eax, 0x7ff
jne 0x4037da
fstp st(0)
mov ecx, edi
and ecx, 0xfffff
or edx, ecx
mov eax, 0x44e2f5
je 0x403773
mov eax, 0x44e543
mov ecx, dword [esp + 0x1c]
mov dword [ecx], eax
mov eax, dword [ebp + 0xc]
mov dword [eax], 0x7000
mov edi, 3
jmp 0x403812
fxch st(1)
fstp qword [esp + 0x48]
mov eax, SysReAllocString
and eax, dword [esp + 0x4c]
or eax, dword [esp + 0x48]
je 0x4037fd
mov dword [esp + 0x1c], ecx
test edi, 0x80000
jne 0x40381b
mov dword [esp + 4], edx
mov edx, 0x80000
xor esi, esi
xor eax, eax
mov ecx, edi
nop
nop
nop
nop
shrd esi, edx, 1
shr edx, 1
mov edi, edx
and edi, ecx
mov ebx, esi
and ebx, dword [esp + 4]
inc eax
or ebx, edi
je 0x4037c0
neg eax
mov esi, dword [ebp + 8]
lea ecx, [eax - 0x3ff]
cmp eax, 0x3fe
jle 0x403820
imul eax, ecx, 0x4d1
mov ebx, eax
sar ebx, 0x1f
shr ebx, 0x14
add ebx, eax
sar ebx, 0xc
inc ebx
jmp 0x403833
fstp st(0)
mov eax, dword [ebp + 0xc]
mov dword [eax], 1
mov dword [ecx], esi
mov byte [esi], 0x30
mov edi, 1
mov eax, dword [esp + 0x10]
jmp 0x403bb6
mov ecx, 0xfffffc01
imul eax, ecx, 0x269
mov ebx, eax
sar ebx, 0x1f
shr ebx, 0x15
add ebx, eax
sar ebx, 0xb
mov eax, 0x12
sub eax, ebx
sub esp, 0x14
mov dword [esp + 0x10], eax
fstp qword [esp + 8]
lea eax, [esp + 0x6c]
mov dword [esp + 4], eax
lea eax, [esp + 0x74]
mov dword [esp], eax
call fcn.004062a0
add esp, 0x14
fld qword [esp + 0x60]
fnstcw word [esp + 0xe]
movzx eax, word [esp + 0xe]
or eax, 0xc00
mov word [esp + 0x26], ax
fldcw word [esp + 0x26]
fld st(0)
fistp qword [esp + 0x40]
fldcw word [esp + 0xe]
mov edx, dword [esp + 0x40]
mov ecx, dword [esp + 0x44]
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x38], edx
fild qword [esp + 0x38]
fld st(1)
fsub st(1)
fld st(0)
fsub st(3)
fld st(1)
fsub st(1)
fsubp st(4)
faddp st(2)
fxch st(2)
fsubrp st(1)
faddp st(1)
fadd qword [esp + 0x58]
fnstcw word [esp + 0xc]
movzx eax, word [esp + 0xc]
or eax, 0xc00
mov word [esp + 0x24], ax
fldcw word [esp + 0x24]
fistp qword [esp + 0x30]
fldcw word [esp + 0xc]
add edx, dword [esp + 0x30]
adc ecx, dword [esp + 0x34]
mov eax, 0xa763ffff
mov dword [esp + 4], edx
cmp eax, edx
mov eax, 0xde0b6b3
mov edx, ecx
sbb eax, ecx
mov eax, dword [ebp + 0x18]
adc ebx, 0
test eax, eax
mov dword [esp + 0x18], ebx
js 0x4038fc
add eax, ebx
jmp 0x403902
and eax, 0x7ffffff
inc eax
cmp eax, 0x17
mov ebx, edx
ja 0x403966
mov esi, eax
xor eax, eax
mov ecx, 0x3b9ac9ff
cmp ecx, dword [esp + 4]
sbb eax, ebx
setb al
movzx eax, al
lea edx, [eax + eax*8]
inc edx
mov eax, edx
mov dword [esp + 8], esi
sub eax, esi
nop
nop
nop
nop
nop
nop
mov ecx, dword [edx*8 + 0x44c0fc]
mov edi, dword [edx*8 + 0x44c0f8]
cmp dword [esp + 4], edi
mov esi, ebx
sbb esi, ecx
jb 0x403954
inc edx
inc eax
cmp edx, 0x14
jne 0x403930
mov esi, dword [ebp + 8]
jmp 0x403966
cmp dword [esp + 8], edx
mov esi, dword [ebp + 8]
jae 0x403966
cmp eax, 0x17
jbe 0x403bd3
mov edx, dword [esp + 4]
xor edi, edi
mov eax, edx
or eax, ebx
je 0x403a09
test ebx, ebx
jle 0x4039ce
nop
nop
nop
nop
nop
nop
mov dword [esp + 4], edx
push 0
push 0x3e8
push ebx
push edx
call fcn.0040ca90
mov ecx, edx
mov dword [esp + 8], eax
mov edx, 0x3e8
mul edx
imul esi, ecx, 0x3e8
add esi, edx
mov edx, dword [esp + 4]
sub edx, eax
mov eax, ebx
sbb eax, esi
or eax, edx
jne 0x403bc7
shr ebx, 3
mov eax, dword [esp + 8]
mov edx, eax
cmp ebx, 0x7c
mov ebx, ecx
ja 0x403980
mov edx, eax
mov esi, dword [ebp + 8]
imul eax, edx, 0x26e978d5
ror eax, 3
cmp eax, 0x418937
ja 0x403a0b
mov ecx, 0x10624dd3
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, edx
mul ecx
shr edx, 6
imul eax, edx, 0x26e978d5
ror eax, 3
cmp eax, 0x418938
jb 0x4039f0
jmp 0x403a0b
xor edx, edx
xor ebx, ebx
lea eax, [esi + 0x40]
mov dword [esp + 0x14], eax
add esi, 0x3e
mov ecx, 0x51eb851f
jmp 0x403a35
mov ecx, 0x51eb851f
add dword [esp + 0x14], 0xfffffff8
mov esi, dword [esp + 4]
add esi, 0xfffffff8
mov edx, dword [esp + 8]
mov dword [esp + 4], esi
cmp edx, 0x5f5e100
mov eax, ebx
sbb eax, 0
jl 0x403a80
push 0
push 0x5f5e100
push ebx
push edx
mov esi, edx
call fcn.0040ca90
mov ebx, edx
mov edx, esi
mov dword [esp + 8], eax
imul eax, eax, 0x5f5e100
sub edx, eax
je 0x403aee
mov dword [esp + 0x20], edi
mov dword [esp + 0x28], ebx
mov ecx, 0x51eb851f
jmp 0x403a9c
test edx, edx
je 0x403b88
mov dword [esp + 0x20], edi
mov dword [esp + 0x28], 0
mov dword [esp + 8], 0
xor esi, esi
nop
nop
mov eax, edx
mov ebx, edx
mul ecx
shr edx, 5
imul eax, edx, 0x64
mov ecx, ebx
sub ecx, eax
movzx eax, word [ecx + ecx + str.00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899]
mov ecx, 0x51eb851f
mov edi, dword [esp + 4]
mov word [edi + esi], ax
add esi, 0xfffffffe
cmp ebx, 0x63
ja 0x403aa0
mov eax, dword [esp + 8]
mov ebx, dword [esp + 0x28]
or eax, ebx
je 0x403b80
mov edi, dword [esp + 0x20]
sub edi, esi
cmp esi, 0xfffffff8
je 0x403a25
jmp 0x403af0
xor esi, esi
mov eax, dword [esp + 0x14]
add eax, 0xfffffff8
lea ecx, [esi + 8]
push ecx
push 0x30
push eax
call fcn.0040cb80
add esp, 0xc
mov eax, esi
and eax, 3
je 0x403b30
xor ecx, ecx
nop
mov edx, edi
and edx, 1
xor edi, 1
lea edi, [edi + edx*2]
inc ecx
cmp eax, ecx
jne 0x403b10
mov eax, esi
sub eax, ecx
jmp 0x403b32
mov eax, esi
add esi, 7
cmp esi, 3
jb 0x403a20
add eax, 8
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ecx, edi
and ecx, 1
xor edi, 1
lea ecx, [edi + ecx*2]
and edi, 1
xor ecx, 1
lea edx, [ecx + edi*2]
and ecx, 1
xor edx, 1
lea ecx, [edx + ecx*2]
and edx, 1
xor ecx, 1
lea edi, [ecx + edx*2]
add eax, 0xfffffffc
jne 0x403b50
jmp 0x403a20
mov edi, dword [esp + 0x20]
sub edi, esi
jmp 0x403b8a
xor esi, esi
mov eax, dword [esp + 0x10]
mov ebx, dword [esp + 0x14]
add ebx, esi
test edi, edi
je 0x403ba5
cmp byte [ebx], 0x30
mov edx, dword [esp + 0x18]
jne 0x403bab
inc ebx
dec edi
jmp 0x403bab
xor edi, edi
mov edx, dword [esp + 0x18]
mov ecx, dword [ebp + 0xc]
mov dword [ecx], edx
mov ecx, dword [esp + 0x1c]
mov dword [ecx], ebx
mov dword [eax], edi
mov eax, dword [esp + 0x2c]
shr eax, 0x1f
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov esi, dword [ebp + 8]
mov edx, dword [esp + 4]
jmp 0x403a0d
mov esi, dword [eax*8 + 0x44c0f8]
mov dword [esp + 8], esi
mov edx, dword [eax*8 + 0x44c0fc]
mov eax, edx
shld eax, esi, 0x1f
mov esi, edx
shr esi, 1
add eax, dword [esp + 4]
adc esi, ebx
cmp eax, edi
mov edi, esi
sbb edi, ecx
sbb dword [esp + 0x18], 0xffffffff
push edx
push dword [esp + 0xc]
push esi
mov esi, dword [ebp + 8]
push eax
call fcn.0040ca90
mov ebx, edx
mov edx, eax
jmp 0x40396a