Function at 0x4209a0
Capabilities:
Allocate thread local storage
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
push edi
mov dword [esp + 0x10], esi
mov dword [esp + 0x18], ebx
mov dword [esi], 0x4fcb04
cmp byte [esi + 0x24], bl
je 0x4209cd
xor cl, cl
call fcn.00416fa0
xor edi, edi
mov dword [esp + 0x14], edi
mov ecx, esi
call fcn.00421ca0
cmp dword [esi + 0x1c], 0
jne 0x420a8f
mov eax, dword [esi + 0xb4]
lea edi, [esi + 0xc]
mov dword [esp + 0xc], eax
test bl, 8
je 0x420a06
lea ecx, [esp + 0x30]
and ebx, 0xfffffff7
call fcn.00403350
mov eax, dword [esp + 0xc]
lea esi, [eax + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esp + 0xc]
cmp dword [eax + 0x34], 0
jne 0x420a20
mov byte [eax + 0x40], 0
jmp 0x420a73
lea edx, [eax + 0x24]
cmp edx, edi
je 0x420a73
mov eax, dword [edi]
mov ecx, dword [edx]
mov dword [edx], eax
mov dword [edi], ecx
mov eax, dword [edx]
test eax, eax
je 0x420a37
mov dword [eax], edx
mov eax, dword [edi]
test eax, eax
je 0x420a3f
mov dword [eax], edi
mov ecx, dword [edx + 4]
mov eax, dword [edi + 4]
mov dword [edx + 4], eax
mov dword [edi + 4], ecx
mov ecx, dword [edx + 8]
mov eax, dword [edi + 8]
mov dword [edx + 8], eax
mov dword [edi + 8], ecx
mov ecx, dword [edx + 0xc]
mov eax, dword [edi + 0xc]
mov dword [edx + 0xc], eax
mov dword [edi + 0xc], ecx
mov eax, dword [edi + 0x10]
mov ecx, dword [edx + 0x10]
mov dword [edx + 0x10], eax
mov eax, dword [esp + 0xc]
mov dword [edi + 0x10], ecx
mov edi, dword [eax + 8]
push esi
mov dword [eax + 8], 0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [esp + 0x10]
add dword [esi + 0x20], edi
mov edi, dword [esp + 0x14]
mov ecx, esi
call fcn.00421ca0
test al, al
je 0x420aa8
inc edi
mov dword [esp + 0x14], edi
cmp edi, 0x64
jl 0x4209d3
test bl, 4
je 0x420abc
lea ecx, [esp + 0xe0]
and ebx, 0xfffffffb
call fcn.00403350
mov eax, dword [esi + 0x5c]
sub eax, dword [esi + 0x58]
test eax, 0xfffffffc
je 0x420cf8
lea eax, [esi + 0x54]
push eax
lea ecx, [esp + 0x20]
call fcn.00422dc0
mov esi, dword [esp + 0x24]
mov edi, dword [esp + 0x1c]
test edi, edi
je 0x420cf4
test bl, 0x10
je 0x420afe
lea ecx, [esp + 0x190]
and ebx, 0xffffffef
call fcn.00403350
cmp byte [edi + 5], 0
je 0x420b75
cmp dword [esp + 0x20], 0
je 0x420b75
test bl, 0x20
je 0x420b1f
lea ecx, [esp + 0x240]
and ebx, 0xffffffdf
call fcn.00403350
test bl, bl
jns 0x420b35
lea ecx, [esp + 0x2f0]
and ebx, 0xffffff7f
call fcn.00403350
mov ecx, dword [esp + 0x28]
xor eax, eax
cmp byte [edi + 5], al
cmovne eax, dword [esp + 0x20]
mov edx, dword [eax + 4]
mov eax, dword [eax + 8]
sub eax, edx
sar eax, 2
cmp eax, ecx
mov dword [esp + 0x2c], eax
cmovb ecx, eax
cmp esi, ecx
jae 0x420b75
lea eax, [edx + esi*4]
nop
cmp dword [eax], 0
jne 0x420c9c
inc esi
add eax, 4
mov dword [esp + 0x24], esi
cmp esi, ecx
jb 0x420b60
test edi, edi
je 0x420cf4
test ebx, 0x100
je 0x420b97
lea ecx, [esp + 0x3a0]
and ebx, 0xfffffeff
call fcn.00403350
cmp byte [edi + 5], 0
je 0x420cdf
mov esi, dword [esp + 0x20]
test esi, esi
je 0x420cdf
test ebx, 0x200
je 0x420bc7
lea ecx, [esp + 0x450]
and ebx, 0xfffffdff
call fcn.00403350
test ebx, 0x800
je 0x420be1
lea ecx, [esp + 0x500]
and ebx, 0xfffff7ff
call fcn.00403350
xor eax, eax
cmp byte [edi + 5], al
cmovne eax, esi
add dword [eax + 0x10], 0xffffffff
jne 0x420cdf
test ebx, 0x1000
je 0x420c0d
lea ecx, [esp + 0x5b0]
and ebx, 0xffffefff
call fcn.00403350
test ebx, 0x4000
je 0x420c27
lea ecx, [esp + 0x660]
and ebx, 0xffffbfff
call fcn.00403350
xor eax, eax
cmp byte [edi + 5], al
cmovne eax, esi
mov dword [esp + 0xc], eax
mov edx, dword [eax + 8]
mov edi, dword [eax + 4]
mov dword [esp + 0x18], edx
cmp edi, edx
je 0x420c8b
cmp dword [edi], 0
je 0x420c4d
add edi, 4
cmp edi, edx
jne 0x420c41
cmp edi, edx
je 0x420c8b
lea eax, [edi + 4]
mov esi, edx
sub esi, eax
xor ecx, ecx
add esi, 3
shr esi, 2
cmp eax, edx
cmova esi, ecx
mov dword [esp + 0x14], esi
test esi, esi
je 0x420c87
mov edx, esi
nop
mov esi, dword [eax]
test esi, esi
je 0x420c7b
mov dword [edi], esi
add edi, 4
inc ecx
add eax, 4
cmp ecx, edx
jne 0x420c70
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0xc]
mov ecx, dword [eax + 4]
cmp edi, ecx
jne 0x420cbd
cmp edx, dword [eax + 8]
jne 0x420cbd
mov dword [eax + 8], ecx
jmp 0x420cdb
cmp esi, ecx
jae 0x420b75
mov ecx, dword [edx + esi*4]
inc esi
mov dword [esp + 0x24], esi
test ecx, ecx
je 0x420b75
mov eax, dword [ecx]
call dword [eax]
jmp 0x420ae2
cmp edi, edx
je 0x420cdb
mov esi, dword [eax + 8]
sub esi, edx
push esi
push edx
push edi
call fcn.004a90d0
mov ecx, dword [esp + 0x18]
lea eax, [esi + edi]
add esp, 0xc
mov dword [ecx + 8], eax
mov edi, dword [esp + 0x1c]
or eax, 0xffffffff
lock xadd dword [edi], eax
sub eax, 1
jne 0x420cf4
push edi
call fcn.004a780d
add esp, 4
mov esi, dword [esp + 0x10]
mov edi, dword [esi + 0xc0]
mov dword [esp + 0x18], edi
mov dword [esi + 0xc0], 0
test edi, edi
je 0x420df5
test ebx, 0x8000
je 0x420d2e
lea ecx, [esp + 0x710]
and ebx, 0xffff7fff
call fcn.00403350
mov eax, dword [0x7c4294]
test eax, 0xfffffffe
jne 0x420dbc
mov ecx, 1
mov edx, 0x7c4294
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x420d76
mov eax, dword [0x7c4294]
cmp eax, 1
jne 0x420dbc
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0
call edi
mov eax, dword [0x7c4294]
cmp eax, 1
je 0x420d62
mov edi, dword [esp + 0x18]
jmp 0x420dbc
mov dword [0x7c4298], 0
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x7c4298], eax
cmp eax, 0xffffffff
jne 0x420d9e
cmp byte [0x7c4190], 0
jne 0x421070
int3
test ebx, 0x10000
je 0x420db2
lea ecx, [esp + 0x7c0]
call fcn.00403350
mov dword [0x7c4294], 0x7c4298
mov ecx, dword [0x7c4294]
xor edx, edx
mov ecx, dword [ecx]
call fcn.00427b60
mov edx, dword [edi]
test edx, edx
je 0x420dec
lea ebx, [edx + 4]
or eax, 0xffffffff
lock xadd dword [ebx], eax
sub eax, 1
jne 0x420dec
xor ecx, ecx
test ebx, ebx
cmovne ecx, edx
mov eax, dword [ecx]
call dword [eax + 0xc]
push edi
call fcn.004a780d
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 + 0x10]
or ebx, 0xffffffff
mov ecx, dword [edi + 0xb4]
mov dword [edi + 0xb4], 0
test ecx, ecx
je 0x420e4b
lea edx, [ecx + 4]
mov eax, ebx
lock xadd dword [edx], eax
sub eax, 1
jne 0x420e4b
test edx, edx
cmove ecx, eax
test ecx, ecx
je 0x420e4b
mov eax, dword [ecx]
push 1
call dword [eax]
mov ecx, dword [edi + 0xb8]
mov dword [edi + 0xb8], 0
test ecx, ecx
je 0x420e77
lea edx, [ecx + 4]
mov eax, ebx
lock xadd dword [edx], eax
sub eax, 1
jne 0x420e77
test edx, edx
cmove ecx, eax
mov eax, dword [ecx]
call dword [eax + 0xc]
mov ecx, dword [edi + 0xbc]
mov dword [edi + 0xbc], 0
test ecx, ecx
je 0x420ea3
lea edx, [ecx + 4]
mov eax, ebx
lock xadd dword [edx], eax
sub eax, 1
jne 0x420ea3
test edx, edx
cmove ecx, eax
mov eax, dword [ecx]
call dword [eax + 0xc]
mov eax, dword [0x7c41f0]
test eax, 0xfffffffe
jne 0x420ecf
push 0x7c41f0
call fcn.00418c90
add esp, 4
test al, al
je 0x420ecf
mov ecx, 0x7c41f4
call fcn.004228b0
mov dword [0x7c41f0], eax
mov eax, dword [0x7c41f0]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, edi
jne 0x420f1b
mov eax, dword [0x7c41f0]
test eax, 0xfffffffe
jne 0x420f0c
push 0x7c41f0
call fcn.00418c90
add esp, 4
test al, al
je 0x420f0c
mov ecx, 0x7c41f4
call fcn.004228b0
mov dword [0x7c41f0], eax
mov ecx, dword [0x7c41f0]
xor edx, edx
mov ecx, dword [ecx]
call fcn.00427b60
mov esi, dword [edi + 0xc0]
mov dword [edi + 0xc0], 0
test esi, esi
je 0x420f3f
mov ecx, esi
call fcn.0042c960
push esi
call fcn.004a780d
add esp, 4
mov edx, dword [edi + 0xbc]
test edx, edx
je 0x420f63
lea esi, [edx + 4]
mov eax, ebx
lock xadd dword [esi], eax
sub eax, 1
jne 0x420f63
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 0x420f87
lea esi, [edx + 4]
mov eax, ebx
lock xadd dword [esi], eax
sub eax, 1
jne 0x420f87
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 0x420fad
lea edx, [ecx + 4]
mov eax, ebx
lock xadd dword [edx], eax
sub eax, 1
jne 0x420fad
test edx, edx
je 0x420fad
test ecx, ecx
je 0x420fad
mov eax, dword [ecx]
push 1
call dword [eax]
lea ecx, [edi + 0x98]
call fcn.00422820
mov eax, dword [edi + 0x8c]
lea esi, [edi + 0x78]
cmp eax, 0x10
jb 0x420fd1
inc eax
mov ecx, esi
push eax
push dword [esi]
call fcn.004022b0
mov dword [esi + 0x14], 0xf
cmp dword [esi + 0x14], 0x10
mov dword [esi + 0x10], 0
jb 0x420fe7
mov esi, dword [esi]
mov byte [esi], 0
mov eax, dword [edi + 0x70]
test eax, eax
je 0x421003
lock xadd dword [eax], ebx
sub ebx, 1
jne 0x421003
push eax
mov eax, dword [eax + 4]
call eax
add esp, 4
lea ecx, [edi + 0x54]
call fcn.00422820
lea ecx, [edi + 0x40]
call fcn.00422900
push 8
push 1
push dword [edi + 0x40]
call fcn.00401650
add esp, 0xc
mov dword [edi + 0x40], 0
lea ecx, [edi + 0x28]
call fcn.004210b0
lea ecx, [edi + 0xc]
call fcn.00422900
push 8
push 1
push dword [edi + 0xc]
call fcn.00401650
mov dword [edi + 0xc], 0
add esp, 0xc
mov ecx, dword [edi + 4]
mov dword [edi + 4], 0
test ecx, ecx
je 0x421063
mov eax, dword [ecx]
push 1
call dword [eax]
mov dword [edi], 0x4fcaf4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 1
call fcn.004b2d10
int3