Function at 0x488180
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e9098
mov eax, dword fs:[0]
push eax
sub esp, 0x40
push ebx
push esi
push edi
mov eax, dword [0x417270]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, ecx
mov dword [ebp - 0x14], edi
mov eax, dword [0x53e204]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x4881e0
push 4
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
je 0x4881e0
mov ecx, dword [0x53e204]
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov ebx, dword [ebp + 0xc]
mov eax, ebx
shr eax, 1
and al, 1
mov dword [esi], 0
je 0x488216
cmp dword [ebp + 0x14], 0
jne 0x488216
push 0x69
mov ecx, edi
call fcn.0047e020
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
mov ecx, dword [ebp + 8]
test ecx, ecx
jne 0x48823c
push 0x6a
mov ecx, edi
call fcn.0047e020
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
mov edx, dword [ebp + 0x1c]
mov dword [ebp - 0x2c], edx
push 0
test al, al
je 0x48836d
push 0x64000
lea ecx, [ebp - 0x4c]
call fcn.0044c530
mov esi, dword [ebp - 0x44]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 8]
mov eax, esi
neg eax
sbb eax, eax
and eax, dword [ebp - 0x48]
push 0x64000
push eax
mov eax, dword [ebp + 0x14]
push eax
push ecx
push ebx
push edx
mov ecx, edi
mov dword [ebp - 4], 0
call fcn.00487b40
cmp eax, 0x64000
jbe 0x4882c3
add eax, 0x400
push eax
lea ecx, [ebp - 0x4c]
mov dword [ebp + 0xc], eax
call fcn.0044cf60
mov esi, dword [ebp - 0x44]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 0x14]
mov eax, esi
neg eax
push ecx
mov ecx, dword [ebp + 8]
sbb eax, eax
and eax, dword [ebp - 0x48]
push eax
mov eax, dword [ebp + 0x10]
push edx
push eax
push ebx
push ecx
mov ecx, edi
call fcn.00487b40
xor ecx, ecx
cmp eax, ecx
je 0x488356
push ecx
mov dl, bl
not dl
neg esi
sbb esi, esi
and esi, dword [ebp - 0x48]
and dl, 1
movzx eax, dl
push eax
lea edx, [ebp + 8]
push edx
push ecx
lea eax, [ebp + 0x10]
push eax
push ecx
lea edx, [ebp + 0x14]
push edx
push ecx
lea eax, [ebp + 0x1c]
mov dword [ebp + 0x14], ecx
mov dword [ebp + 0x10], ecx
mov dword [ebp + 8], ecx
mov ecx, dword [ebp + 0x18]
push eax
push ecx
push esi
mov byte [ebp - 4], 1
call fcn.004a4b60
add esp, 0x2c
lea ecx, [ebp - 0x4c]
mov dword [ebp - 4], 0xffffffff
call fcn.0042a080
jmp 0x48857b
mov dword [ebp + 0x1c], ecx
lea ecx, [ebp - 0x4c]
mov dword [ebp - 4], 0xffffffff
call fcn.0042a080
jmp 0x48857b
push 0
push 0
push ecx
mov ecx, edi
call fcn.00487cf0
mov esi, eax
test esi, esi
jne 0x4883a1
push 0xc9
mov ecx, edi
call fcn.0047e020
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
xor ecx, ecx
mov eax, esi
mov edx, 0x90
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004caa28
mov edi, eax
add esp, 4
mov dword [ebp - 0x18], edi
mov eax, dword [ebp + 8]
push esi
mov esi, dword [ebp - 0x14]
push edi
push 0
push eax
mov ecx, esi
mov dword [ebp - 4], 3
call fcn.00487cf0
mov dword [ebp - 0x1c], eax
test eax, eax
jne 0x488410
push 0xc9
mov ecx, esi
call fcn.0047e020
test edi, edi
je 0x4883fa
push edi
call fcn.004cada5
add esp, 4
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
push 0
mov esi, 0x64000
push esi
lea ecx, [ebp - 0x4c]
mov dword [ebp + 0x14], 0
call fcn.0044c530
xor ecx, ecx
mov byte [ebp - 4], 4
mov dword [ebp + 0xc], ecx
cmp ecx, dword [ebp - 0x1c]
jge 0x488556
mov eax, dword [ebp - 0x44]
mov edx, dword [ebp + 0x10]
neg eax
sbb eax, eax
and eax, dword [ebp - 0x48]
push esi
lea ecx, [ecx + ecx*8]
push eax
mov eax, dword [ebp + 8]
shl ecx, 4
add edi, ecx
mov ecx, dword [ebp - 0x14]
push edi
push edx
push ebx
push eax
call fcn.00487b40
cmp eax, esi
jbe 0x488490
lea esi, [eax + 0x400]
push esi
lea ecx, [ebp - 0x4c]
call fcn.0044cf60
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 8]
neg eax
push esi
sbb eax, eax
and eax, dword [ebp - 0x48]
push eax
push edi
push ecx
mov ecx, dword [ebp - 0x14]
push ebx
push edx
call fcn.00487b40
xor ecx, ecx
cmp eax, ecx
je 0x4884f8
mov eax, dword [ebp + 0x1c]
mov edi, dword [ebp + 0x14]
mov byte [ebp - 4], 5
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x20], ecx
cmp eax, edi
jbe 0x4884b4
sub eax, edi
mov dword [ebp + 0x14], eax
jmp 0x4884b7
mov dword [ebp + 0x14], ecx
mov eax, dword [ebp - 0x44]
push ecx
neg eax
sbb eax, eax
and eax, dword [ebp - 0x48]
mov dl, bl
not dl
and dl, 1
movzx edx, dl
push edx
lea edx, [ebp - 0x20]
push edx
push ecx
lea edx, [ebp - 0x24]
push edx
push ecx
lea edx, [ebp - 0x28]
push edx
push ecx
mov edx, edi
shl edx, 0xa
add edx, dword [ebp + 0x18]
lea ecx, [ebp + 0x14]
push ecx
push edx
push eax
call fcn.004a4b60
add esp, 0x2c
add edi, dword [ebp + 0x14]
mov dword [ebp + 0x14], edi
inc dword [ebp + 0xc]
mov edi, dword [ebp - 0x18]
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 4], 4
jmp 0x488430
mov eax, dword [ebp + 0x14]
lea ecx, [ebp - 0x4c]
mov dword [ebp + 0x1c], eax
call fcn.0042a080
mov dword [ebp - 4], 0xffffffff
test edi, edi
je 0x488578
push edi
call fcn.004cada5
add esp, 4
mov edi, dword [ebp - 0x14]
mov eax, dword [ebp + 0x1c]
cmp eax, dword [ebp - 0x2c]
jbe 0x48858f
push 0x70
mov ecx, edi
call fcn.0047e020
mov eax, dword [ebp + 0x1c]
mov esi, dword [ebp + 0x18]
test esi, esi
je 0x48860f
shr ebx, 0xc
test bl, 1
je 0x48860f
test eax, eax
jbe 0x48860f
add esi, 0x2d4
mov ebx, eax
cmp dword [esi + 0xc], 0
je 0x4885b9
push esi
push esi
mov ecx, edi
call fcn.00482680
cmp dword [esi - 0x18], 0
je 0x4885cb
lea eax, [esi - 0x24]
push eax
push eax
mov ecx, edi
call fcn.00482680
cmp dword [esi - 8], 0
je 0x4885dd
lea eax, [esi - 0x14]
push eax
push eax
mov ecx, edi
call fcn.00482680
cmp dword [esi - 0x3c], 0
je 0x4885ef
lea eax, [esi - 0x48]
push eax
push eax
mov ecx, edi
call fcn.00482680
cmp dword [esi - 0x2c], 0
je 0x488601
lea eax, [esi - 0x38]
push eax
push eax
mov ecx, edi
call fcn.00482680
add esi, 0x400
sub ebx, 1
jne 0x4885aa
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18