Function at 0x451fb0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x2c
mov esi, ecx
mov edi, dword [ebp + 0x1c]
mov ecx, dword [ebp + 0xc]
mov eax, dword [0x597010]
xor eax, ebp
mov dword [ebp - 0x10], eax
cmp byte [ecx], 0
je 0x451ff9
push dword [0x599b44]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
and eax, 0xfffffffc
je 0x452000
mov ecx, dword [esi + 0x198]
mov edx, dword [eax + ecx*8 + 4]
cmp edx, dword [esi + 0x19c]
jne 0x452000
cmp dword [eax + ecx*8], 0
je 0x452000
xor ebx, ebx
jmp 0x452268
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp eax, edi
jne 0x452236
mov eax, dword [0x5a8228]
cmp eax, 1
ja 0x452049
push 0x5a8228
call fcn.00473460
add esp, 4
test al, al
je 0x452044
push 0x3c
call fcn.005283f4
add esp, 4
mov ebx, eax
mov ecx, eax
call fcn.00488cd0
mov dword [0x5a8228], ebx
jmp 0x452049
mov eax, dword [0x5a8228]
mov eax, dword [0x5a8224]
mov ecx, dword [0x59b038]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x452346
push dword [0x599b44]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
xor ecx, ecx
and eax, 0xfffffffc
je 0x452092
mov edx, dword [0x5a821c]
mov ebx, dword [eax + edx*8 + 4]
cmp ebx, dword [0x5a8220]
jne 0x452092
mov ecx, dword [eax + edx*8]
test ecx, ecx
mov eax, 0x584bec
cmovne eax, ecx
mov dword [ebp - 0x24], eax
mov eax, dword [0x59cb54]
mov ecx, dword [0x59b038]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x452392
mov ebx, dword [0x59cb50]
push dword [0x599b44]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
and eax, 0xfffffffc
je 0x4520ee
mov ecx, dword [ebx]
mov edx, dword [eax + ecx*8 + 4]
cmp edx, dword [ebx + 4]
jne 0x4520ee
mov edx, dword [ebp - 0x24]
cmp edx, dword [eax + ecx*8]
je 0x452236
mov eax, dword [ebp - 0x24]
cmp byte [eax], 0
je 0x452236
mov ebx, dword [0x59cb50]
push dword [0x599b44]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
and eax, 0xfffffffc
je 0x45233c
mov ecx, dword [ebx]
mov edx, dword [ebp - 0x24]
mov dword [eax + ecx*8], edx
mov ecx, dword [ebx]
mov edx, dword [ebx + 4]
mov dword [eax + ecx*8 + 4], edx
lea ebx, [esi + 8]
push ebx
call dword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
jne 0x45213b
push ebx
call dword [sym.imp.KERNEL32.dll_AcquireSRWLockExclusive]
mov dword [ebp - 0x30], ebx
mov edx, dword [esi + 0x8c]
add esi, 0x88
test edx, edx
je 0x452206
mov ecx, edx
shr ecx, 1
and ecx, 0x55555555
mov eax, edx
sub eax, ecx
mov ecx, eax
and ecx, 0x33333333
shr eax, 2
and eax, 0x33333333
add eax, ecx
mov ecx, eax
shr ecx, 4
add ecx, eax
and ecx, 0xf0f0f0f
imul ebx, ecx, 0x1010101
shr ebx, 0x18
cmp ebx, 1
mov dword [ebp - 0x28], edx
ja 0x452195
dec edx
and edx, edi
jmp 0x4521a4
mov eax, edx
mov edx, edi
cmp eax, edi
ja 0x4521a4
mov eax, edi
xor edx, edx
div dword [ebp - 0x28]
mov eax, dword [esi]
mov dword [ebp - 0x2c], edx
mov eax, dword [eax + edx*4]
test eax, eax
mov edx, dword [ebp - 0x28]
je 0x452206
mov ecx, dword [eax]
test ecx, ecx
je 0x452206
lea eax, [edx - 1]
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], ebx
jmp 0x4521df
cmp dword [ecx + 8], edi
je 0x45227e
mov ecx, dword [ecx]
test ecx, ecx
je 0x452206
mov eax, dword [ecx + 4]
cmp eax, edi
je 0x4521d0
cmp ebx, 1
ja 0x4521f0
and eax, dword [ebp - 0x38]
jmp 0x452201
cmp eax, edx
jb 0x452201
xor edx, edx
div dword [ebp - 0x28]
mov eax, edx
mov edx, dword [ebp - 0x28]
mov ebx, dword [ebp - 0x34]
cmp eax, dword [ebp - 0x2c]
je 0x4521d9
lea eax, [ebp + 0x1c]
mov dword [ebp - 0x14], eax
lea edi, [ebp - 0x14]
lea edx, [ebp - 0x20]
mov ecx, esi
push edi
push eax
call fcn.00454200
add esp, 8
mov ecx, dword [ebp - 0x20]
add ecx, 0xc
push dword [ebp - 0x24]
call fcn.0044d9c0
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov bl, 1
mov esi, dword [ebp + 0xc]
test byte [esi], 8
je 0x452268
mov eax, dword [ebp + 0x10]
movzx ecx, byte [ebp + 8]
test eax, eax
mov edx, 0x57cb06
cmovne edx, eax
movsx eax, cl
push dword [ebp + 0x20]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push edx
push esi
push eax
call fcn.004877f0
add esp, 0x18
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00528e13
mov eax, ebx
add esp, 0x2c
pop esi
pop edi
pop ebx
pop ebp
ret 0x1c
mov dword [ebp - 0x20], 0xffffffff
mov dword [ebp - 0x1c], 0xffffffff
mov dword [ebp - 0x18], 0xffffffff
lea edi, [ecx + 0xc]
movzx eax, byte [ecx + 0x17]
mov edx, edi
test al, al
jns 0x4522a6
mov edx, dword [ecx + 0xc]
mov eax, dword [ecx + 0x10]
lea ecx, [ebp - 0x20]
push 1
push 0
push 1
push 0x57c9f7
push eax
push edx
push ecx
call fcn.00466be0
add esp, 0x1c
mov ebx, dword [ebp - 0x20]
mov esi, dword [ebp - 0x1c]
cmp ebx, esi
je 0x452310
mov dword [ebp - 0x28], edi
push dword [ebp - 0x24]
call fcn.005429e0
add esp, 4
mov edi, eax
mov dword [ebp - 0x2c], ebx
jmp 0x4522e5
add ebx, 8
cmp ebx, esi
je 0x452304
cmp dword [ebx + 4], edi
jne 0x4522de
test edi, edi
je 0x452300
push edi
push dword [ebp - 0x24]
push dword [ebx]
call fcn.0052a60d
add esp, 0xc
test eax, eax
jne 0x4522de
cmp ebx, esi
jne 0x452320
mov edi, dword [ebp - 0x28]
mov ecx, edi
push 0x2c
call fcn.0044dd52
mov ecx, edi
push dword [ebp - 0x24]
call fcn.0044de4e
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x45222c
mov dword [ebp - 0x1c], eax
push eax
call fcn.00528424
add esp, 4
jmp 0x45222c
call fcn.004625e0
jmp 0x452115
push 0x5a8224
call fcn.00528497
add esp, 4
cmp dword [0x5a8224], 0xffffffff
jne 0x45206a
mov dword [0x5a821c], 0xffffffff
mov dword [0x5a8220], 0
mov ecx, 0x5a821c
push 0
call fcn.004624b0
push 0x5a8224
call fcn.0052850d
add esp, 4
jmp 0x45206a
push 0x59cb54
call fcn.00528497
add esp, 4
cmp dword [0x59cb54], 0xffffffff
jne 0x4520c0
push 8
call fcn.005283f4
add esp, 4
mov ebx, eax
mov dword [eax + 4], 0
mov dword [eax], 0xffffffff
mov ecx, eax
push 0
call fcn.004624b0
mov dword [0x59cb50], ebx
push 0x59cb54
call fcn.0052850d
add esp, 4
jmp 0x4520c0