Function at 0x426230
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x864
push ebx
push esi
mov esi, ecx
xor ebx, ebx
mov dword [esp + 0xc], ebx
push edi
mov dword [esp + 0xc], esi
lea edi, [ebx + 1]
mov dword [esi], 0x564ca8
cmp byte [esi + 0x24], bl
je 0x42629c
mov ecx, 0x58bcc4
mov dword [esp + 0x2c], 0xffffffff
call fcn.0041b540
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp byte [0x58bce0], bl
mov eax, 4
cmovne eax, edi
sub dword [0x58bcf0], edi
jne 0x426291
push eax
call dword [sym.imp.WINMM.dll_timeEndPeriod]
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [esp + 0xc]
xor edi, edi
mov dword [esp + 0x14], edi
mov ecx, esi
call fcn.004273d0
cmp dword [esi + 0x1c], 0
jne 0x426313
mov edi, dword [esi + 0xb4]
lea eax, [esi + 0xc]
mov dword [esp + 0x10], edi
mov dword [esp + 0x28], eax
test bl, 8
je 0x4262d1
lea ecx, [esp + 0x30]
and ebx, 0xfffffff7
call fcn.0040f4c0
lea esi, [edi + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [edi + 0x34], 0
jne 0x4262e7
mov byte [edi + 0x40], 0
jmp 0x4262f3
push dword [esp + 0x28]
lea ecx, [edi + 0x24]
call fcn.0042ce10
mov eax, dword [esp + 0x10]
mov edi, dword [edi + 8]
push esi
mov dword [eax + 8], 0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [esp + 0xc]
add dword [esi + 0x20], edi
mov edi, dword [esp + 0x14]
mov ecx, esi
call fcn.004273d0
test al, al
je 0x42632c
inc edi
mov dword [esp + 0x14], edi
cmp edi, 0x64
jl 0x4262a2
test bl, 4
je 0x426340
lea ecx, [esp + 0xe0]
and ebx, 0xfffffffb
call fcn.0040f4c0
mov eax, dword [esi + 0x5c]
sub eax, dword [esi + 0x58]
test eax, 0xfffffffc
je 0x4264cb
lea eax, [esi + 0x54]
push eax
lea ecx, [esp + 0x1c]
call fcn.00428150
mov edi, dword [esp + 0x18]
mov esi, dword [esp + 0x20]
test edi, edi
je 0x4264c7
test bl, 0x10
je 0x426382
lea ecx, [esp + 0x190]
and ebx, 0xffffffef
call fcn.0040f4c0
cmp byte [edi + 5], 0
je 0x4263f7
cmp dword [esp + 0x1c], 0
je 0x4263f7
test bl, 0x20
je 0x4263a3
lea ecx, [esp + 0x240]
and ebx, 0xffffffdf
call fcn.0040f4c0
test bl, bl
jns 0x4263b9
lea ecx, [esp + 0x2f0]
and ebx, 0xffffff7f
call fcn.0040f4c0
mov ecx, dword [esp + 0x24]
xor eax, eax
cmp byte [edi + 5], al
cmovne eax, dword [esp + 0x1c]
mov edx, dword [eax + 4]
mov eax, dword [eax + 8]
sub eax, edx
sar eax, 2
cmp eax, ecx
mov dword [esp + 0x10], eax
cmovb ecx, eax
cmp esi, ecx
jae 0x4263f7
lea eax, [edx + esi*4]
cmp dword [eax], 0
jne 0x426632
inc esi
add eax, 4
mov dword [esp + 0x20], esi
cmp esi, ecx
jb 0x4263e2
test edi, edi
je 0x4264c7
test ebx, 0x100
je 0x426419
lea ecx, [esp + 0x3a0]
and ebx, 0xfffffeff
call fcn.0040f4c0
cmp byte [edi + 5], 0
je 0x4264b2
mov esi, dword [esp + 0x1c]
test esi, esi
je 0x4264b2
test ebx, 0x200
je 0x426449
lea ecx, [esp + 0x450]
and ebx, 0xfffffdff
call fcn.0040f4c0
test ebx, 0x800
je 0x426463
lea ecx, [esp + 0x500]
and ebx, 0xfffff7ff
call fcn.0040f4c0
xor eax, eax
cmp byte [edi + 5], al
cmovne eax, esi
add dword [eax + 0x10], 0xffffffff
jne 0x4264b2
test ebx, 0x1000
je 0x42648b
lea ecx, [esp + 0x5b0]
and ebx, 0xffffefff
call fcn.0040f4c0
test ebx, 0x4000
je 0x4264a5
lea ecx, [esp + 0x660]
and ebx, 0xffffbfff
call fcn.0040f4c0
xor ecx, ecx
cmp byte [edi + 5], cl
cmovne ecx, esi
call fcn.004280e0
or eax, 0xffffffff
lock xadd dword [edi], eax
sub eax, 1
jne 0x4264c7
push edi
call fcn.0048ac22
add esp, 4
mov esi, dword [esp + 0xc]
mov edi, dword [esi + 0xc0]
mov dword [esi + 0xc0], 0
test edi, edi
je 0x426534
test ebx, 0x8000
je 0x4264f9
lea ecx, [esp + 0x710]
and ebx, 0xffff7fff
call fcn.0040f4c0
call fcn.00431880
xor edx, edx
mov ecx, dword [eax]
call fcn.0042d400
mov edx, dword [edi]
test edx, edx
je 0x42652b
lea ecx, [edx + 4]
or eax, 0xffffffff
lock xadd dword [ecx], eax
sub eax, 1
jne 0x42652b
lea eax, [edx + 4]
xor ecx, ecx
test eax, eax
cmovne ecx, edx
mov eax, dword [ecx]
call dword [eax + 0xc]
push edi
call fcn.0048ac22
add esp, 4
mov edi, dword [esi + 0xb4]
lea esi, [edi + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push esi
mov dword [edi + 0x38], 0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edi, dword [esp + 0xc]
mov ecx, dword [edi + 0xb4]
mov dword [edi + 0xb4], 0
test ecx, ecx
je 0x426583
lea edx, [ecx + 4]
or eax, 0xffffffff
lock xadd dword [edx], eax
sub eax, 1
jne 0x426583
test edx, edx
je 0x426583
mov eax, dword [ecx]
push 1
call dword [eax]
mov edx, dword [edi + 0xb8]
mov dword [edi + 0xb8], 0
test edx, edx
je 0x4265b2
lea esi, [edx + 4]
or eax, 0xffffffff
lock xadd dword [esi], eax
sub eax, 1
jne 0x4265b2
xor ecx, ecx
test esi, esi
cmovne ecx, edx
mov eax, dword [ecx]
call dword [eax + 0xc]
mov edx, dword [edi + 0xbc]
mov dword [edi + 0xbc], 0
test edx, edx
je 0x4265e1
lea esi, [edx + 4]
or eax, 0xffffffff
lock xadd dword [esi], eax
sub eax, 1
jne 0x4265e1
xor ecx, ecx
test esi, esi
cmovne ecx, edx
mov eax, dword [ecx]
call dword [eax + 0xc]
call fcn.004279b0
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, edi
jne 0x426671
mov eax, dword [0x58bdc4]
test eax, 0xfffffffe
jne 0x426662
mov edx, 0x58bdc4
xor eax, eax
mov ecx, 1
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x426653
mov eax, dword [0x58bdc4]
cmp eax, 1
jne 0x426662
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0
call esi
mov eax, dword [0x58bdc4]
cmp eax, 1
je 0x426622
jmp 0x426662
cmp esi, ecx
jae 0x4263f7
mov ecx, dword [edx + esi*4]
inc esi
mov dword [esp + 0x20], esi
test ecx, ecx
je 0x4263f7
mov eax, dword [ecx]
call dword [eax]
jmp 0x426366
mov ecx, 0x58bdc8
call fcn.00427be0
mov dword [0x58bdc4], eax
mov ecx, dword [0x58bdc4]
xor edx, edx
mov ecx, dword [ecx]
call fcn.0042d400
mov esi, dword [edi + 0xc0]
mov dword [edi + 0xc0], 0
test esi, esi
je 0x4266d1
test ebx, 0x10000
je 0x426699
lea ecx, [esp + 0x7c0]
call fcn.0040f4c0
call fcn.00431880
xor edx, edx
mov ecx, dword [eax]
call fcn.0042d400
mov edx, dword [esi]
test edx, edx
je 0x4266c8
lea ebx, [edx + 4]
or eax, 0xffffffff
lock xadd dword [ebx], eax
sub eax, 1
jne 0x4266c8
xor ecx, ecx
test ebx, ebx
cmovne ecx, edx
mov eax, dword [ecx]
call dword [eax + 0xc]
push esi
call fcn.0048ac22
add esp, 4
mov edx, dword [edi + 0xbc]
or ebx, 0xffffffff
test edx, edx
je 0x4266f8
lea esi, [edx + 4]
mov eax, ebx
lock xadd dword [esi], eax
sub eax, 1
jne 0x4266f8
xor ecx, ecx
test esi, esi
cmovne ecx, edx
mov eax, dword [ecx]
call dword [eax + 0xc]
mov edx, dword [edi + 0xb8]
test edx, edx
je 0x42671c
lea esi, [edx + 4]
mov eax, ebx
lock xadd dword [esi], eax
sub eax, 1
jne 0x42671c
xor ecx, ecx
test esi, esi
cmovne ecx, edx
mov eax, dword [ecx]
call dword [eax + 0xc]
mov ecx, dword [edi + 0xb4]
test ecx, ecx
je 0x426742
lea edx, [ecx + 4]
mov eax, ebx
lock xadd dword [edx], eax
sub eax, 1
jne 0x426742
test edx, edx
je 0x426742
test ecx, ecx
je 0x426742
mov eax, dword [ecx]
push 1
call dword [eax]
lea ecx, [edi + 0x98]
call fcn.00427b50
lea ecx, [edi + 0x78]
call fcn.00402090
mov eax, dword [edi + 0x70]
test eax, eax
je 0x42676e
lock xadd dword [eax], ebx
sub ebx, 1
jne 0x42676e
push eax
mov eax, dword [eax + 4]
call eax
add esp, 4
lea ecx, [edi + 0x54]
call fcn.00427b50
lea ecx, [edi + 0x40]
call fcn.00427c30
push dword [edi + 0x40]
call fcn.0048ac22
mov dword [edi + 0x40], 0
add esp, 4
mov ecx, dword [edi + 0x28]
test ecx, ecx
je 0x4267dc
push dword [esp + 0x2c]
mov edx, dword [edi + 0x2c]
push ecx
call fcn.00428570
mov esi, dword [edi + 0x28]
mov eax, 0x2aaaaaab
mov ecx, dword [edi + 0x30]
add esp, 8
sub ecx, esi
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
push eax
push esi
call fcn.00428020
mov dword [edi + 0x28], 0
mov dword [edi + 0x2c], 0
mov dword [edi + 0x30], 0
lea ecx, [edi + 0xc]
call fcn.00427c30
push dword [edi + 0xc]
call fcn.0048ac22
mov dword [edi + 0xc], 0
add esp, 4
mov ecx, dword [edi + 4]
mov dword [edi + 4], 0
test ecx, ecx
je 0x42680a
mov eax, dword [ecx]
push 1
call dword [eax]
mov dword [edi], 0x564c98
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret