Function at 0x473620
Capabilities:
Encode data using xor
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
mov eax, dword [0x4c6060]
sub esp, 0x54
push ebx
push esi
push edi
mov esi, ecx
mov ebx, dword [esi + 0xa4]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [eax + 0x20]
mov ecx, ebx
sar ecx, 5
lea ecx, [ecx*4 + 0x30]
and ecx, 0xfffffff0
lea edx, [edi + ecx]
cmp edx, dword [eax + 0x2c]
ja 0x473663
mov dword [eax + 0x20], edx
mov dword [esp + 0x10], edi
jmp 0x473673
mov edx, dword [eax]
push ecx
mov ecx, eax
mov eax, dword [edx + 0x14]
call eax
mov dword [esp + 0x10], eax
mov edi, eax
sar ebx, 7
fldz
mov ecx, edi
js 0x473691
mov eax, ecx
fst dword [eax]
add ecx, 0x10
sub ebx, 1
fst dword [eax + 4]
fst dword [eax + 8]
fst dword [eax + 0xc]
jns 0x47367c
mov ecx, dword [ebp + 8]
fld dword [esi + 0x40]
fadd dword [ecx]
fstp dword [esp + 0x20]
fld dword [esi + 0x44]
fadd dword [ecx + 4]
fstp dword [esp + 0x24]
fld dword [esi + 0x48]
fadd dword [ecx + 8]
fstp dword [esp + 0x28]
fld dword [esi + 0x60]
fmul dword [esp + 0x20]
fstp dword [esp + 0x20]
fld dword [esi + 0x64]
fmul dword [esp + 0x24]
fstp dword [esp + 0x24]
fld dword [esi + 0x68]
fmul dword [esp + 0x28]
fstp dword [esp + 0x28]
fld dword [esp + 0x20]
fld dword [0x4c59c0]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 0x41
je 0x4736eb
fst dword [esp + 0x20]
fld dword [esp + 0x24]
fld dword [0x4c59c4]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 0x41
je 0x473704
fst dword [esp + 0x24]
fld dword [esp + 0x28]
fld dword [0x4c59c8]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 0x41
je 0x47371d
fst dword [esp + 0x28]
fxch st(3)
fcom dword [esp + 0x20]
fnstsw ax
test ah, 5
jnp 0x47372e
fst dword [esp + 0x20]
fcom dword [esp + 0x24]
fnstsw ax
test ah, 5
jnp 0x47373d
fst dword [esp + 0x24]
fcom dword [esp + 0x28]
fnstsw ax
test ah, 5
jnp 0x47374c
fst dword [esp + 0x28]
fld dword [esp + 0x20]
fld qword [0x4b9f08]
fadd st(1), st(0)
fxch st(1)
fstp dword [esp + 0x20]
mov edx, dword [esp + 0x20]
fld dword [esp + 0x24]
shr edx, 7
fadd st(1)
mov word [esp + 0x30], dx
fstp dword [esp + 0x24]
mov eax, dword [esp + 0x24]
fld dword [esp + 0x28]
shr eax, 7
fadd st(1)
mov word [esp + 0x32], ax
fstp dword [esp + 0x28]
mov edx, dword [esp + 0x28]
fld dword [ecx + 0x10]
shr edx, 7
fadd dword [esi + 0x50]
mov word [esp + 0x34], dx
fstp dword [esp + 0x20]
fld dword [ecx + 0x14]
fadd dword [esi + 0x54]
fstp dword [esp + 0x24]
fld dword [ecx + 0x18]
fadd dword [esi + 0x58]
fstp dword [esp + 0x28]
fld dword [esi + 0x60]
fmul dword [esp + 0x20]
fstp dword [esp + 0x20]
fld dword [esi + 0x64]
fmul dword [esp + 0x24]
fstp dword [esp + 0x24]
fld dword [esi + 0x68]
fmul dword [esp + 0x28]
fstp dword [esp + 0x28]
fld dword [esp + 0x20]
fcomp st(4)
fnstsw ax
test ah, 5
jnp 0x4737ea
fxch st(3)
fstp dword [esp + 0x20]
jmp 0x4737ec
fstp st(3)
fld dword [esp + 0x24]
fcomp st(2)
fnstsw ax
test ah, 5
jnp 0x473801
fxch st(1)
fstp dword [esp + 0x24]
jmp 0x473803
fstp st(1)
fld dword [esp + 0x28]
fcomp st(3)
fnstsw ax
test ah, 5
jnp 0x473818
fxch st(2)
fstp dword [esp + 0x28]
jmp 0x47381a
fstp st(2)
fxch st(1)
fcom dword [esp + 0x20]
fnstsw ax
test ah, 5
jnp 0x47382b
fst dword [esp + 0x20]
fcom dword [esp + 0x24]
fnstsw ax
test ah, 5
jnp 0x47383a
fst dword [esp + 0x24]
fcom dword [esp + 0x28]
fnstsw ax
test ah, 5
jnp 0x47384b
fstp dword [esp + 0x28]
jmp 0x47384d
fstp st(0)
fld dword [esp + 0x20]
mov edx, dword [esp + 0x30]
fadd st(1)
and edx, 0xfffe
mov dword [esp + 0x40], edx
mov edx, dword [esp + 0x32]
fstp dword [esp + 0x20]
mov eax, dword [esp + 0x20]
fld dword [esp + 0x24]
and edx, 0xfffe
fadd st(1)
shr eax, 7
mov dword [esp + 0x44], edx
mov edx, dword [esp + 0x34]
fstp dword [esp + 0x24]
mov ecx, dword [esp + 0x24]
and edx, 0xfffe
fadd dword [esp + 0x28]
shr ecx, 7
mov dword [esp + 0x48], edx
movzx edx, ax
movzx eax, cx
fstp dword [esp + 0x28]
mov ebx, dword [esp + 0x28]
or eax, 1
mov dword [esp + 0x54], eax
shr ebx, 7
movzx eax, bx
or eax, 1
mov dword [esp + 0x58], eax
mov eax, dword [esi + 0xac]
or edx, 1
add eax, 4
cmp dword [esi + 0xd0], 0
mov dword [esp + 0x50], edx
je 0x4739be
mov ebx, dword [esp + 0x40]
mov ecx, 0x10
sub ecx, dword [esi + 0xd4]
sar ebx, cl
test ebx, ebx
jle 0x4739be
mov eax, dword [esi + 0xd8]
shl ebx, 4
movzx ecx, word [ebx + eax - 0x10]
lea edx, [ebx + eax - 0x10]
mov eax, ecx
and ecx, 0x1f
mov ebx, 1
shl ebx, cl
sar eax, 5
mov dword [esp + 0x18], edx
xor dword [edi + eax*4], ebx
mov ebx, dword [edx + 8]
sub ebx, 1
mov ecx, dword [edx + 4]
mov dword [esp + 0x14], ecx
js 0x473953
mov edx, dword [esp + 0x14]
movzx ecx, word [edx]
add dword [esp + 0x14], 2
mov eax, ecx
and ecx, 0x1f
mov edx, 1
shl edx, cl
sar eax, 5
xor dword [edi + eax*4], edx
sub ebx, 1
jns 0x47392c
mov edx, dword [esp + 0x18]
movzx eax, word [edx]
mov ecx, dword [esi + 0xac]
shl eax, 4
add eax, dword [esi + 0xa0]
movzx edx, word [eax + 8]
movzx ebx, word [eax + 0xa]
lea edx, [ecx + edx*4 + 4]
lea ecx, [ecx + ebx*4]
cmp edx, ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ecx
jae 0x4739ac
test byte [edx], 1
jne 0x4739a5
movzx ecx, word [edx + 2]
mov eax, ecx
and ecx, 0x1f
mov ebx, 1
shl ebx, cl
mov ecx, dword [esp + 0x18]
sar eax, 5
not ebx
and dword [edi + eax*4], ebx
mov eax, dword [esp + 0x14]
add edx, 4
cmp edx, ecx
jb 0x473980
movzx eax, word [eax + 8]
mov ecx, dword [esi + 0xac]
mov edx, dword [esp + 0x50]
lea eax, [ecx + eax*4 + 4]
movzx ecx, word [eax]
cmp ecx, dword [esp + 0x40]
jae 0x4739ed
movzx ecx, word [eax + 2]
mov ebx, ecx
and ecx, 0x1f
mov edx, 1
shl edx, cl
sar ebx, 5
add eax, 4
xor dword [edi + ebx*4], edx
movzx ecx, word [eax]
cmp ecx, dword [esp + 0x40]
jb 0x4739c7
mov edx, dword [esp + 0x50]
movzx ecx, word [eax]
movzx ebx, cx
cmp ebx, edx
jae 0x473a24
test cl, 1
jne 0x473a16
movzx ecx, word [eax + 2]
mov ebx, ecx
and ecx, 0x1f
mov edx, 1
shl edx, cl
sar ebx, 5
xor dword [edi + ebx*4], edx
mov edx, dword [esp + 0x50]
movzx ecx, word [eax + 4]
add eax, 4
movzx ebx, cx
cmp ebx, edx
jb 0x4739f7
mov ebx, dword [esi + 0xb8]
mov edx, dword [esp + 0x44]
mov eax, dword [esi + 0xbc]
lea edi, [esi + 0xb8]
lea eax, [ebx + eax*4 - 8]
push edx
lea ecx, [ebx + 4]
push eax
push ecx
mov ecx, edi
mov dword [esp + 0x24], eax
call fcn.00471f40
mov ecx, dword [esp + 0x18]
sub eax, ebx
sar eax, 2
mov word [esp + 0x20], ax
mov eax, dword [esp + 0x54]
push eax
push ecx
lea eax, [ebx + 4]
push eax
mov ecx, edi
call fcn.00471f40
mov edx, 0xfffffffc
sub edx, ebx
mov ebx, dword [esi + 0xc4]
add eax, edx
mov edx, dword [esp + 0x48]
sar eax, 2
lea edi, [esi + 0xc4]
mov word [esp + 0x24], ax
mov eax, dword [edi + 4]
lea eax, [ebx + eax*4 - 8]
push edx
lea ecx, [ebx + 4]
push eax
push ecx
mov ecx, edi
mov dword [esp + 0x24], eax
call fcn.00471f40
mov ecx, dword [esp + 0x18]
sub eax, ebx
sar eax, 2
mov word [esp + 0x22], ax
mov eax, dword [esp + 0x58]
push eax
push ecx
lea eax, [ebx + 4]
push eax
mov ecx, edi
call fcn.00471f40
mov edi, dword [esp + 0x10]
mov ecx, dword [esi + 0xa4]
mov edx, 0xfffffffc
sub edx, ebx
add eax, edx
sar ecx, 5
sar eax, 2
lea ecx, [edi + ecx*4 + 4]
cmp edi, ecx
mov edx, edi
mov word [esp + 0x26], ax
mov eax, dword [esi + 0xa0]
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], ecx
jae 0x473c25
mov edi, dword [ebp + 0xc]
lea esi, [eax + 0x24]
mov dword [esp + 0x14], esi
lea ebx, [ebx]
mov ebx, dword [edx]
test ebx, ebx
je 0x473c04
lea ebx, [ebx]
test bl, 0xf
je 0x473bf0
test bl, 1
je 0x473b5b
mov edx, dword [esp + 0x24]
mov eax, dword [esi - 0x20]
sub edx, dword [esi - 0x24]
sub eax, dword [esp + 0x20]
or edx, eax
test edx, 0x80008000
jne 0x473b5b
mov eax, dword [esi - 0x18]
test al, 1
jne 0x473b5b
mov edx, dword [edi]
push 0
push eax
mov eax, dword [edx + 4]
mov ecx, edi
call eax
fstp st(0)
test bl, 2
je 0x473b8d
mov ecx, dword [esp + 0x24]
mov edx, dword [esi - 0x10]
sub ecx, dword [esi - 0x14]
sub edx, dword [esp + 0x20]
or ecx, edx
test ecx, 0x80008000
jne 0x473b8d
mov eax, dword [esi - 8]
test al, 1
jne 0x473b8d
mov edx, dword [edi]
push 0
push eax
mov eax, dword [edx + 4]
mov ecx, edi
call eax
fstp st(0)
test bl, 4
je 0x473bbe
mov ecx, dword [esp + 0x24]
mov edx, dword [esi]
sub ecx, dword [esi - 4]
sub edx, dword [esp + 0x20]
or ecx, edx
test ecx, 0x80008000
jne 0x473bbe
mov eax, dword [esi + 8]
test al, 1
jne 0x473bbe
mov edx, dword [edi]
push 0
push eax
mov eax, dword [edx + 4]
mov ecx, edi
call eax
fstp st(0)
test bl, 8
je 0x473bf0
mov ecx, dword [esp + 0x24]
mov edx, dword [esi + 0x10]
sub ecx, dword [esi + 0xc]
sub edx, dword [esp + 0x20]
or ecx, edx
test ecx, 0x80008000
jne 0x473bf0
mov eax, dword [esi + 0x18]
test al, 1
jne 0x473bf0
mov edx, dword [edi]
push 0
push eax
mov eax, dword [edx + 4]
mov ecx, edi
call eax
fstp st(0)
add esi, 0x40
shr ebx, 4
jne 0x473b20
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov esi, dword [esp + 0x14]
add edx, 4
add esi, 0x200
cmp edx, ecx
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], edx
jb 0x473b10
mov edi, dword [esp + 0x10]
mov ecx, dword [0x4c6060]
push ecx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp edi, dword [eax + 0x28]
mov dword [eax + 0x20], edi
jne 0x473c44
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x18]
push edi
call eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8