Function at 0x403720
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x70
fld qword [ebp + 0x10]
fst qword [esp + 0x50]
mov ebx, dword [esp + 0x54]
mov eax, ebx
shr eax, 0x14
fld st(0)
fchs
test ebx, ebx
js 0x403748
fstp st(0)
fld st(0)
mov esi, dword [ebp + 8]
mov edi, dword [esp + 0x50]
and eax, 0x7ff
je 0x4037a0
fstp st(1)
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], edx
cmp eax, 0x7ff
jne 0x4037f9
fstp st(0)
mov ecx, ebx
and ecx, 0xfffff
or edi, ecx
mov ecx, 0x44e2f5
je 0x403783
mov ecx, 0x44e543
mov eax, dword [esp + 0x1c]
mov dword [eax], ecx
mov eax, dword [ebp + 0xc]
mov dword [eax], 0x7000
mov edi, 3
mov edx, dword [esp + 0x20]
jmp 0x403c62
fxch st(1)
fstp qword [esp + 0x48]
mov eax, 0x7fffffff
and eax, dword [esp + 0x4c]
or eax, dword [esp + 0x48]
je 0x4039be
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], edx
xor eax, eax
test ebx, 0x80000
jne 0x4037f9
mov edx, 0x80000
xor esi, esi
xor eax, eax
mov dword [esp + 8], edi
nop
nop
nop
nop
nop
nop
nop
nop
dec eax
shrd esi, edx, 1
shr edx, 1
mov edi, edx
and edi, ebx
mov ecx, ebx
mov ebx, esi
and ebx, dword [esp + 8]
or ebx, edi
mov ebx, ecx
je 0x4037e0
mov edi, dword [ebp + 0x18]
mov edx, eax
not edx
and edx, 0x3ff
and eax, 0xfffffc00
sub eax, edx
mov dword [esp + 0x28], ebx
js 0x403846
mov ecx, eax
and ecx, 0x7ffffb2e
mov edx, eax
and edx, 0x4d1
or eax, 0x4d1
imul eax, edx
xor edx, 0x4d1
imul edx, ecx
add eax, edx
mov esi, eax
sar esi, 0x1f
shr esi, 0x14
add esi, eax
sar esi, 0xc
inc esi
jmp 0x403876
mov edx, eax
and edx, 0x269
mov ecx, eax
or eax, 0x269
imul eax, edx
xor edx, 0x269
and ecx, 0xfffffd96
imul ecx, edx
add eax, ecx
mov esi, eax
sar esi, 0x1f
shr esi, 0x15
add esi, eax
sar esi, 0xb
mov eax, 0x12
sub eax, esi
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.00406300
add esp, 0x14
fld qword [esp + 0x60]
fnstcw word [esp + 0x1a]
movzx eax, word [esp + 0x1a]
or eax, 0xc00
mov word [esp + 0x26], ax
fldcw word [esp + 0x26]
fld st(0)
fistp qword [esp + 0x40]
fldcw word [esp + 0x1a]
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 + 0x18]
movzx eax, word [esp + 0x18]
or eax, 0xc00
mov word [esp + 0x24], ax
fldcw word [esp + 0x24]
fistp qword [esp + 0x30]
fldcw word [esp + 0x18]
add edx, dword [esp + 0x30]
adc ecx, dword [esp + 0x34]
mov eax, 0xa763ffff
cmp eax, edx
mov eax, 0xde0b6b3
mov dword [esp + 4], ecx
sbb eax, ecx
adc esi, 0
mov ecx, edi
test edi, edi
mov dword [esp + 0x2c], esi
js 0x403943
mov eax, esi
and eax, ecx
xor ecx, esi
lea ecx, [ecx + eax*2]
jmp 0x40394a
and ecx, 0x7ffffff
inc ecx
mov edi, dword [ebp + 8]
cmp ecx, 0x17
ja 0x403a15
xor eax, eax
mov esi, ecx
mov ecx, 0x3b9ac9ff
mov dword [esp + 8], edx
cmp ecx, edx
sbb eax, dword [esp + 4]
setb al
movzx eax, al
lea edx, [eax + eax*8]
inc edx
mov eax, edx
mov dword [esp + 0x14], esi
sub eax, esi
nop
nop
nop
nop
nop
mov ecx, dword [edx*8 + 0x44c0fc]
mov esi, dword [edx*8 + 0x44c0f8]
cmp dword [esp + 8], esi
mov edi, dword [esp + 4]
sbb edi, ecx
jb 0x4039aa
inc edx
inc eax
cmp edx, 0x14
jne 0x403980
mov edi, dword [ebp + 8]
mov edx, dword [esp + 8]
jmp 0x403a15
cmp dword [esp + 0x14], edx
mov edi, dword [ebp + 8]
jae 0x4039b8
cmp eax, 0x17
jbe 0x4039d8
mov edx, dword [esp + 8]
jmp 0x403a15
fstp st(0)
mov eax, dword [ebp + 0xc]
mov dword [eax], 1
mov dword [ecx], esi
mov byte [esi], 0x30
mov edi, 1
jmp 0x403c62
mov ebx, dword [eax*8 + 0x44c0f8]
mov edx, dword [eax*8 + 0x44c0fc]
mov eax, edx
shld eax, ebx, 0x1f
mov edi, edx
shr edi, 1
add eax, dword [esp + 8]
adc edi, dword [esp + 4]
cmp eax, esi
mov esi, edi
sbb esi, ecx
sbb dword [esp + 0x2c], 0xffffffff
push edx
push ebx
push edi
mov edi, dword [ebp + 8]
push eax
call fcn.0040caf0
mov dword [esp + 4], edx
mov edx, eax
mov eax, edx
or eax, dword [esp + 4]
je 0x403ac1
cmp dword [esp + 4], 0
jle 0x403a7f
nop
nop
nop
nop
nop
nop
nop
nop
push 0
push 0x3e8
push dword [esp + 0xc]
push edx
mov ebx, edx
call fcn.0040caf0
mov ecx, eax
mov edi, edx
mov edx, 0x3e8
mul edx
imul esi, edi, 0x3e8
add esi, edx
mov edx, ebx
sub edx, eax
mov eax, dword [esp + 4]
sbb eax, esi
or eax, edx
jne 0x403c71
mov eax, dword [esp + 4]
shr eax, 3
mov edx, ecx
cmp eax, 0x7c
mov dword [esp + 4], edi
ja 0x403a30
mov edx, ecx
mov edi, dword [ebp + 8]
imul eax, edx, 0x26e978d5
ror eax, 3
cmp eax, 0x418937
ja 0x403ab7
mov ecx, 0x10624dd3
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 0x403aa0
mov dword [esp + 0xc], 0
jmp 0x403acb
mov dword [esp + 0xc], 0
xor edx, edx
mov dword [esp + 4], 0
lea ecx, [edi + 0x40]
add edi, 0x3e
mov esi, 0x51eb851f
jmp 0x403b20
xor edx, edx
mov ebx, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
mov dword [esp + 8], edx
lea eax, [ecx - 8]
mov esi, ecx
lea ecx, [edx + 8]
push ecx
push 0x30
push eax
call fcn.0040ccf0
mov ecx, esi
mov esi, 0x51eb851f
add esp, 0xc
mov eax, dword [esp + 8]
add ebx, eax
add ebx, 8
mov dword [esp + 0xc], ebx
add ecx, 0xfffffff8
add edi, 0xfffffff8
mov edx, dword [esp + 0x14]
cmp edx, 0x5f5e100
mov eax, dword [esp + 4]
sbb eax, 0
mov dword [esp + 0x10], ecx
jl 0x403b70
push 0
push 0x5f5e100
push dword [esp + 0xc]
push edx
mov esi, edx
call fcn.0040caf0
mov dword [esp + 4], edx
mov edx, esi
mov dword [esp + 0x14], eax
imul eax, eax, 0x5f5e100
sub edx, eax
je 0x403ae0
mov esi, 0x51eb851f
jmp 0x403b88
test edx, edx
je 0x403c11
mov dword [esp + 4], 0
mov dword [esp + 0x14], 0
xor ecx, ecx
nop
nop
nop
nop
nop
nop
mov dword [esp + 8], ecx
mov eax, edx
mov ebx, edx
mul esi
shr edx, 5
imul ecx, edx, 0x64
mov eax, ebx
sub eax, ecx
mov ecx, eax
and ecx, 2
mov esi, edi
mov edi, eax
or eax, 2
imul eax, ecx
xor ecx, 2
and edi, 0x7d
imul edi, ecx
movzx eax, word [edi + eax + str.00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899]
mov edi, esi
mov esi, dword [esp + 8]
mov word [edi + esi], ax
lea ecx, [esi - 2]
mov esi, 0x51eb851f
cmp ebx, 0x63
ja 0x403b90
mov eax, dword [esp + 0x14]
or eax, dword [esp + 4]
je 0x403bff
mov ebx, dword [esp + 0xc]
sub ebx, ecx
cmp ecx, 0xfffffff8
mov edx, ecx
mov ecx, dword [esp + 0x10]
jne 0x403aea
jmp 0x403b12
mov eax, dword [esp + 0xc]
sub eax, ecx
mov ebx, dword [esp + 0x28]
mov edx, ecx
mov ecx, dword [esp + 0x10]
jmp 0x403c1b
xor edx, edx
mov ebx, dword [esp + 0x28]
mov eax, dword [esp + 0xc]
add ecx, edx
test eax, eax
je 0x403c3d
mov edi, eax
cmp byte [ecx], 0x30
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
mov esi, ecx
mov ecx, dword [ebp + 0xc]
jne 0x403c50
inc esi
mov dword [esp + 0x10], esi
dec edi
jmp 0x403c54
mov dword [esp + 0x10], ecx
xor edi, edi
mov edx, dword [esp + 0x20]
mov esi, dword [esp + 0x1c]
mov ecx, dword [ebp + 0xc]
jmp 0x403c56
mov dword [esp + 0x10], esi
mov esi, eax
mov eax, dword [esp + 0x2c]
mov dword [ecx], eax
mov eax, dword [esp + 0x10]
mov dword [esi], eax
mov dword [edx], edi
shr ebx, 0x1f
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov edi, dword [ebp + 8]
mov edx, ebx
mov dword [esp + 0xc], 0
jmp 0x403ad3