Function at 0x4840c0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x78
mov esi, ecx
mov eax, dword [0x511014]
xor eax, ebp
mov dword [esp + 0x70], eax
test byte [0x512ba0], 0x19
jne 0x484636
call fcn.00494b8d
mov eax, dword [eax]
mov dword [esp + 8], eax
call fcn.00494b8d
xor edi, edi
mov dword [eax], edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 4], eax
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edi, dword [0x524aec]
cmp edi, 1
jbe 0x4845c8
mov ebx, dword [esi + 4]
push dword [0x514c54]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
and eax, 0xfffffffc
je 0x484609
mov ecx, dword [edi]
mov dword [eax + ecx*8], ebx
mov ecx, dword [edi]
mov edx, dword [edi + 4]
mov dword [eax + ecx*8 + 4], edx
mov edi, dword [esi]
test edi, edi
jne 0x484218
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_SetLastError]
call fcn.00494b8d
mov ecx, dword [esp + 8]
mov dword [eax], ecx
cmp byte [esi + 0x20], 0
je 0x484174
mov eax, dword [esi + 0x30]
test eax, eax
jne 0x48427e
mov byte [esi + 0x20], 0
mov eax, dword [esi + 0xc]
test eax, eax
jne 0x48467e
mov edi, dword [esi + 0x14]
mov dword [esi + 0x14], 0
test edi, edi
jne 0x4846ce
mov ecx, dword [esi + 0xc]
xor eax, eax
test ecx, ecx
jne 0x4846e3
mov ecx, eax
shr ecx, 0xe
mov edx, eax
shr edx, 0x13
mov edx, dword [edx*4 + 0x518914]
bt edx, ecx
jb 0x4846f9
mov dword [esi + 0xc], 0
mov eax, dword [esi + 4]
mov ecx, eax
shr ecx, 0xe
mov edx, eax
shr edx, 0x13
mov edx, dword [edx*4 + 0x518914]
bt edx, ecx
jb 0x484707
mov dword [esi + 4], 0
mov eax, dword [esi]
mov ecx, eax
shr ecx, 0xe
mov edx, eax
shr edx, 0x13
mov edx, dword [edx*4 + 0x518914]
bt edx, ecx
jb 0x484356
mov dword [esi], 0
mov ecx, dword [esp + 0x70]
xor ecx, ebp
call fcn.00496ce3
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
cmp dword [esi + 4], 0
jne 0x48414a
mov ebx, dword [edi + 0x1c]
add ebx, 0x14
push ebx
call dword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x484396
xor eax, eax
mov dword [edi + 0x18], eax
mov dword [edi + 0x14], eax
cmp byte [edi + 0x26], 0
jne 0x48426c
cmp byte [edi + 0x24], 0
mov eax, dword [edi + 0x1c]
jne 0x4843a2
dec dword [eax + 0xa8]
cmp byte [edi + 0xc], 0
je 0x484715
cmp byte [edi + 0xd], 0
je 0x484364
mov word [edi + 0x24], 0
push ebx
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
jmp 0x48414a
mov dword [esp + 8], eax
mov ecx, dword [fcn.0048cd00]
cmp ecx, 0x493220
jne 0x48437c
xor eax, eax
lea ebx, [esp + 0x68]
mov dword [ebx + 4], eax
mov dword [ebx], eax
push ebx
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov edi, dword [ebx]
mov ebx, dword [ebx + 4]
mov eax, 0x7bd05af6
cmp eax, edi
mov eax, 0x863
sbb eax, ebx
jl 0x484727
mov ecx, 0xf4240
mov eax, edi
mul ecx
imul ecx, ebx, 0xf4240
add ecx, edx
push dword [0x52120c]
push dword [0x521208]
push ecx
push eax
call fcn.004b5fc0
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], edx
mov ecx, dword [esi + 0x28]
mov edi, dword [esi + 0x2c]
mov dword [esp + 0x14], eax
mov dword [esp + 4], ecx
sub eax, ecx
mov dword [esp + 0xc], edx
mov ecx, edx
mov edx, edi
sbb ecx, edi
seto bl
mov edi, ecx
sar edi, 0x1f
test bl, bl
cmovne eax, edi
add edi, 0x80000000
test bl, bl
cmove edi, ecx
cmp eax, 0xf4240
mov ecx, edi
sbb ecx, 0
jge 0x4843ce
mov edi, dword [esi + 0x30]
test edi, edi
je 0x484170
lock dec dword [edi]
jne 0x484170
mov ecx, edi
call fcn.00409d50
push edi
call fcn.00494aa1
add esp, 4
jmp 0x484170
push eax
call fcn.00454d60
add esp, 4
jmp 0x4841ff
cmp byte [edi + 0x25], 0
mov ecx, dword [edi + 0x1c]
jne 0x484717
dec dword [ecx + 0xac]
jmp 0x48426c
call dword [section..00cfg]
lea edi, [esp + 0x58]
push edi
call ecx
add esp, 4
mov eax, dword [edi]
mov edx, dword [edi + 4]
jmp 0x4842eb
mov ecx, ebx
call fcn.004597a0
jmp 0x484237
mov ecx, dword [eax + 0x20]
mov edx, dword [eax + 0x98]
dec edx
mov dword [eax + 0x98], edx
cmp ecx, dword [eax + 0x24]
je 0x4843c3
cmp dword [eax + 0xa0], edx
jae 0x48461b
mov word [eax + 0x3c], 0
jmp 0x484258
mov dword [esp + 0x18], edx
mov dword [esp + 0x10], eax
mov edx, dword [esp + 8]
mov eax, dword [edx + 0xfc]
mov ecx, 0x3938700
add ecx, dword [edx + 0xf8]
adc eax, 0
seto dl
mov ebx, eax
sar ebx, 0x1f
test dl, dl
cmovne ecx, ebx
add ebx, 0x80000000
test dl, dl
cmove ebx, eax
mov eax, dword [esp + 0x14]
cmp eax, ecx
mov ecx, dword [esp + 0xc]
sbb ecx, ebx
jge 0x4847b8
mov ebx, dword [esp + 4]
mov eax, dword [esp + 8]
sub ebx, dword [eax + 0xf8]
mov edx, dword [esp + 0x18]
sbb edx, dword [eax + 0xfc]
seto cl
mov eax, edx
sar eax, 0x1f
test cl, cl
cmovne ebx, eax
add eax, 0x80000000
test cl, cl
cmove eax, edx
mov ecx, ebx
add ecx, 1
mov edx, eax
adc edx, 0x80000000
cmp ecx, 2
sbb edx, 0
jb 0x48480c
movd xmm0, ebx
movd xmm1, eax
punpckldq xmm0, xmm1
movq qword [esp + 0x50], xmm0
fild qword [esp + 0x50]
fstp qword [esp + 0x48]
movsd xmm0, qword [esp + 0x48]
mov ebx, 0x80000000
divsd xmm0, qword [0x5049c0]
sub esp, 8
movsd qword [esp], xmm0
call fcn.004bded0
add esp, 8
fstp qword [esp + 0x40]
movsd xmm0, qword [esp + 0x40]
movsd xmm1, qword [0x504a40]
ucomisd xmm1, xmm0
jb 0x48481d
maxsd xmm0, qword [0x504a48]
cvttsd2si ecx, xmm0
mov eax, dword [esp + 0x10]
movd xmm0, eax
xor edx, edx
inc edx
add edx, eax
adc ebx, edi
movd xmm1, edi
cmp edx, 2
sbb ebx, 0
punpckldq xmm0, xmm1
movq qword [esp + 0x38], xmm0
fild qword [esp + 0x38]
fstp qword [esp + 0x30]
jb 0x484502
movsd xmm0, qword [esp + 0x30]
divsd xmm0, qword [0x5049c0]
jmp 0x48450a
movsd xmm0, qword [0x504a50]
mov ebx, ecx
pxor xmm1, xmm1
ucomisd xmm0, xmm1
jb 0x484834
addsd xmm0, qword [0x4fdc88]
sub esp, 8
movsd qword [esp], xmm0
call fcn.004bded0
add esp, 8
fstp qword [esp + 0x28]
movsd xmm0, qword [esp + 0x28]
movsd xmm1, qword [0x504a40]
ucomisd xmm1, xmm0
jb 0x48485b
maxsd xmm0, qword [0x504a48]
cvttsd2si edx, xmm0
add edx, ebx
cmp edx, 0x3c
mov edi, 0x3c
mov dword [esp + 0x14], edx
cmovl edi, edx
mov eax, dword [esp + 8]
add eax, 4
mov dword [esp + 4], eax
push eax
call dword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x484628
cmp ebx, edi
mov eax, dword [esp + 8]
jge 0x484596
inc dword [eax + ebx*4 + 8]
inc ebx
cmp edi, ebx
jne 0x48458d
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov edx, dword [esp + 0x14]
cmp edx, 0x3d
jl 0x48432d
mov eax, dword [esp + 8]
mov eax, dword [eax + 0x100]
sub edx, edi
xor ebx, ebx
mov dword [esp + 8], eax
test eax, eax
jne 0x48455a
jmp 0x48432d
push 0x524aec
call fcn.004099e0
add esp, 4
test al, al
je 0x484872
xor eax, eax
mov dword [0x524af4], eax
mov dword [0x524af0], 0xffffffff
mov edi, 0x524af0
mov ecx, 0x524af0
push eax
call fcn.00404c70
mov dword [0x524aec], edi
jmp 0x48411a
test ebx, ebx
je 0x484140
call fcn.004048c0
jmp 0x484132
movzx ecx, word [ecx + 8]
mov word [eax + 0x3c], cx
jmp 0x484258
mov ecx, dword [esp + 4]
call fcn.004597a0
jmp 0x484585
xor eax, eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x68], eax
sub esp, 0x18
movsd xmm0, qword [esp + 0x80]
movsd qword [esp + 0x10], xmm0
mov dword [esp + 0xc], 0x502e28
mov dword [esp + 8], 0x504a73
mov dword [esp + 4], 0x512ba0
mov dword [esp], 0x45
call fcn.00414a30
add esp, 0x18
jmp 0x4840e6
mov ecx, dword [esi + 0x10]
cmp dword [eax + 0xc], ecx
jbe 0x48417f
mov eax, dword [eax + 8]
shl ecx, 7
cmp dword [eax + ecx + 0x68], 0
je 0x48417f
mov ebx, dword [0x52113c]
lea edi, [ebx + 0x74]
push edi
call dword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x48487d
add ebx, 0x48
mov ecx, dword [esi + 0xc]
push ebx
push dword [esi + 0x10]
call fcn.004d7640
push edi
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
jmp 0x48417f
mov ecx, edi
call fcn.004d6f40
push edi
call fcn.00494aa1
add esp, 4
jmp 0x484191
mov eax, dword [ecx + 4]
lock dec dword [eax + 0x38]
mov eax, dword [ecx + 4]
lock inc dword [eax + 0x3c]
mov eax, dword [esi + 0xc]
jmp 0x48419e
push eax
call fcn.00454d60
add esp, 4
jmp 0x4841b8
push eax
call fcn.00454d60
add esp, 4
jmp 0x4841dc
ud2
dec dword [ecx + 0x9c]
call fcn.004eb2f0
jmp 0x48426c
mov eax, dword [0x521208]
mov dword [esp + 4], eax
mov ecx, dword [0x52120c]
mov dword [esp + 0x14], ecx
push ecx
push eax
push ebx
push edi
call fcn.004b5fc0
mov dword [esp + 0xc], eax
mov dword [esp + 0x1c], edx
mul dword [esp + 4]
mov dword [esp + 0x18], eax
mov ecx, dword [esp + 0xc]
imul ecx, dword [esp + 0x14]
add edx, ecx
mov eax, dword [esp + 0x1c]
imul ecx, eax, 0xf4240
mov dword [esp + 0x10], ecx
imul eax, dword [esp + 4]
add eax, edx
sub edi, dword [esp + 0x18]
sbb ebx, eax
mov ecx, 0xf4240
mov eax, dword [esp + 0xc]
mul ecx
mov dword [esp + 0xc], eax
add edx, dword [esp + 0x10]
mov dword [esp + 0x10], edx
mov eax, edi
mul ecx
imul ecx, ebx, 0xf4240
add edx, ecx
push dword [esp + 0x14]
push dword [esp + 8]
push edx
push eax
call fcn.004b5fc0
add eax, dword [esp + 0xc]
adc edx, dword [esp + 0x10]
jmp 0x4842e3
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0xc]
mov dword [esp + 0x6c], eax
sub esp, 0xc
movsd xmm0, qword [esp + 0x74]
movsd qword [esp + 4], xmm0
lea ebx, [esp + 0x70]
mov dword [esp], ebx
call fcn.0046b7d0
add esp, 0xc
mov ecx, dword [ebx]
test ecx, ecx
je 0x484418
mov ebx, ecx
lock dec dword [ecx]
jne 0x484418
mov ecx, ebx
call fcn.00409d50
push ebx
call fcn.00494aa1
add esp, 4
jmp 0x484418
shr eax, 0x1f
movsd xmm0, qword [eax*8 + 0x502940]
jmp 0x484480
xor eax, eax
ucomisd xmm0, qword [0x504a48]
mov ecx, 0x7fffffff
cmovb ecx, eax
jmp 0x4844c5
addsd xmm0, qword [0x504a58]
sub esp, 8
movsd qword [esp], xmm0
call fcn.004bd750
add esp, 8
fstp qword [esp + 0x20]
movsd xmm0, qword [esp + 0x20]
jmp 0x48453c
xor eax, eax
ucomisd xmm0, qword [0x504a48]
mov edx, 0x7fffffff
cmovb edx, eax
jmp 0x48455a
mov edi, dword [0x524aec]
jmp 0x48411a
mov ecx, edi
call fcn.004597a0
jmp 0x4846b3