Function at 0x472f70
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 0x472fb3
mov dword [eax + 0x20], edx
mov dword [esp + 0x10], edi
jmp 0x472fc3
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 0x472fe1
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 0x472fcc
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 0x47303b
fst dword [esp + 0x20]
fld dword [esp + 0x24]
fld dword [0x4c59c4]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 0x41
je 0x473054
fst dword [esp + 0x24]
fld dword [esp + 0x28]
fld dword [0x4c59c8]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 0x41
je 0x47306d
fst dword [esp + 0x28]
fxch st(3)
fcom dword [esp + 0x20]
fnstsw ax
test ah, 5
jnp 0x47307e
fst dword [esp + 0x20]
fcom dword [esp + 0x24]
fnstsw ax
test ah, 5
jnp 0x47308d
fst dword [esp + 0x24]
fcom dword [esp + 0x28]
fnstsw ax
test ah, 5
jnp 0x47309c
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 0x47313a
fxch st(3)
fstp dword [esp + 0x20]
jmp 0x47313c
fstp st(3)
fld dword [esp + 0x24]
fcomp st(2)
fnstsw ax
test ah, 5
jnp 0x473151
fxch st(1)
fstp dword [esp + 0x24]
jmp 0x473153
fstp st(1)
fld dword [esp + 0x28]
fcomp st(3)
fnstsw ax
test ah, 5
jnp 0x473168
fxch st(2)
fstp dword [esp + 0x28]
jmp 0x47316a
fstp st(2)
fxch st(1)
fcom dword [esp + 0x20]
fnstsw ax
test ah, 5
jnp 0x47317b
fst dword [esp + 0x20]
fcom dword [esp + 0x24]
fnstsw ax
test ah, 5
jnp 0x47318a
fst dword [esp + 0x24]
fcom dword [esp + 0x28]
fnstsw ax
test ah, 5
jnp 0x47319b
fstp dword [esp + 0x28]
jmp 0x47319d
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 0x47330e
mov ebx, dword [esp + 0x40]
mov ecx, 0x10
sub ecx, dword [esi + 0xd4]
sar ebx, cl
test ebx, ebx
jle 0x47330e
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 + 0xc], ecx
js 0x4732a3
mov edx, dword [esp + 0xc]
movzx ecx, word [edx]
add dword [esp + 0xc], 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 0x47327c
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 0x4732fc
test byte [edx], 1
jne 0x4732f5
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 0x4732d0
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 0x47333d
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 0x473317
mov edx, dword [esp + 0x50]
movzx ecx, word [eax]
movzx ebx, cx
cmp ebx, edx
jae 0x473374
test cl, 1
jne 0x473366
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 0x473347
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 0x4735f5
mov esi, dword [ebp + 0xc]
add eax, 0x24
mov dword [esp + 0x14], eax
lea ebx, [ebx]
mov eax, dword [edx]
test eax, eax
mov dword [esp + 0xc], eax
je 0x4735de
mov edi, dword [esp + 0x14]
test al, 0xf
je 0x4735be
test al, 1
je 0x4734c9
mov edx, dword [esp + 0x24]
mov eax, dword [edi - 0x20]
sub edx, dword [edi - 0x24]
sub eax, dword [esp + 0x20]
or edx, eax
test edx, 0x80008000
jne 0x4734c9
mov ebx, dword [edi - 0x18]
test bl, 1
jne 0x4734c9
mov ecx, dword [esi + 8]
and ecx, 0x3fffffff
cmp dword [esi + 4], ecx
jne 0x4734b7
push 8
push esi
call fcn.00402730
add esp, 8
mov ecx, dword [esi + 4]
mov eax, dword [esi]
xor edx, edx
mov dword [eax + ecx*8], edx
mov dword [eax + ecx*8 + 4], ebx
add dword [esi + 4], 1
test byte [esp + 0xc], 2
je 0x47351b
mov edx, dword [esp + 0x24]
mov eax, dword [edi - 0x10]
sub edx, dword [edi - 0x14]
sub eax, dword [esp + 0x20]
or edx, eax
test edx, 0x80008000
jne 0x47351b
mov ebx, dword [edi - 8]
test bl, 1
jne 0x47351b
mov ecx, dword [esi + 8]
and ecx, 0x3fffffff
cmp dword [esi + 4], ecx
jne 0x473509
push 8
push esi
call fcn.00402730
add esp, 8
mov ecx, dword [esi + 4]
mov eax, dword [esi]
xor edx, edx
mov dword [eax + ecx*8], edx
mov dword [eax + ecx*8 + 4], ebx
add dword [esi + 4], 1
test byte [esp + 0xc], 4
je 0x47356c
mov edx, dword [esp + 0x24]
mov eax, dword [edi]
sub edx, dword [edi - 4]
sub eax, dword [esp + 0x20]
or edx, eax
test edx, 0x80008000
jne 0x47356c
mov ebx, dword [edi + 8]
test bl, 1
jne 0x47356c
mov ecx, dword [esi + 8]
and ecx, 0x3fffffff
cmp dword [esi + 4], ecx
jne 0x47355a
push 8
push esi
call fcn.00402730
add esp, 8
mov ecx, dword [esi + 4]
mov eax, dword [esi]
xor edx, edx
mov dword [eax + ecx*8], edx
mov dword [eax + ecx*8 + 4], ebx
add dword [esi + 4], 1
test byte [esp + 0xc], 8
je 0x4735be
mov edx, dword [esp + 0x24]
mov eax, dword [edi + 0x10]
sub edx, dword [edi + 0xc]
sub eax, dword [esp + 0x20]
or edx, eax
test edx, 0x80008000
jne 0x4735be
mov ebx, dword [edi + 0x18]
test bl, 1
jne 0x4735be
mov ecx, dword [esi + 8]
and ecx, 0x3fffffff
cmp dword [esi + 4], ecx
jne 0x4735ac
push 8
push esi
call fcn.00402730
add esp, 8
mov ecx, dword [esi + 4]
mov eax, dword [esi]
xor edx, edx
mov dword [eax + ecx*8], edx
mov dword [eax + ecx*8 + 4], ebx
add dword [esi + 4], 1
mov eax, dword [esp + 0xc]
add edi, 0x40
shr eax, 4
mov dword [esp + 0xc], eax
jne 0x473472
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
mov edi, dword [esp + 0x10]
add dword [esp + 0x14], 0x200
add edx, 4
cmp edx, ecx
mov dword [esp + 0x18], edx
jb 0x473460
mov edx, dword [0x4c6060]
push edx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp edi, dword [eax + 0x28]
mov dword [eax + 0x20], edi
jne 0x473614
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