Function at 0x41d220
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x49bba8
mov eax, dword fs:[0]
push eax
sub esp, 0x34
push ebx
push esi
push edi
mov eax, dword [0x4cf06c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov edi, dword [esi + 0xf20]
test edi, edi
js 0x41d263
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov edx, edi
mov ecx, eax
call fcn.0045ab30
lea eax, [ebp - 0x40]
mov dword [ebp - 0x38], 0
push eax
push dword [esi + 0x10]
xorps xmm0, xmm0
mov byte [ebp - 0x34], 0
movlpd qword [ebp - 0x40], xmm0
mov dword [ebp - 0x30], 0
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, dword [esi + 0x8c8]
lea edi, [esi + 0xf2c]
mov ebx, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push edi
mov dword [ebp - 0x30], eax
call ebx
inc dword [esi + 0xef4]
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea edx, [ebp - 0x14]
mov dword [ebp - 0x14], esi
lea ecx, [ebp - 0x24]
call fcn.00418a50
mov dword [ebp - 4], 0
cmp dword [esi + 0xff4], 0
jne 0x41d538
xor eax, eax
or ecx, 0xffffffff
mov dword [ebp - 0x10], 0
xor edi, edi
mov dword [ebp - 0x14], ecx
cmp dword [esi + 0x7c4], edi
jle 0x41d3f8
nop
test ecx, ecx
js 0x41d345
mov eax, dword [esi + 0xb78]
mov ebx, dword [eax + ecx*4]
xor ecx, ecx
mov edx, dword [eax + edi*4]
test ebx, ebx
sete cl
xor eax, eax
test edx, edx
sete al
cmp eax, ecx
jne 0x41d33e
test edx, edx
je 0x41d345
mov ebx, dword [ebx + 0x68]
mov eax, dword [edx + 0x68]
test ebx, ebx
jne 0x41d329
test eax, eax
je 0x41d345
cmp word [eax], bx
jmp 0x41d33c
test eax, eax
mov ecx, 0x4c2758
mov edx, ebx
cmovne ecx, eax
call fcn.004122a0
test eax, eax
je 0x41d345
mov ecx, esi
call fcn.0041d5c0
lea eax, [ebp - 0x10]
mov ecx, esi
push eax
push edi
call fcn.00414210
test eax, eax
je 0x41d3de
mov eax, dword [esi + 0x8c8]
mov ebx, dword [ebp - 0x10]
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x30], eax
cmp edi, 1
jl 0x41d37d
cmp dword [esi + 0xffc], ebx
je 0x41d37d
push ecx
mov ecx, esi
call fcn.004240a0
lea eax, [ebp - 0x1c]
mov dword [esi + 0xffc], ebx
push eax
push 0
push 0
push 2
mov ecx, esi
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], ebx
call fcn.00423340
test edi, edi
jne 0x41d3b3
cmp dword [esi + 0x684], 2
je 0x41d3b3
push edi
push edi
push edi
push 1
mov ecx, esi
call fcn.00423340
mov eax, dword [esi + 0xb54]
mov ecx, esi
and eax, 4
or eax, 8
shr eax, 2
push edi
push eax
xor eax, eax
cmp dword [esi + 0x688], 5
setne al
push eax
push dword [esi + 0x840]
call fcn.0041e1a0
mov eax, dword [esi + 0xff4]
test eax, eax
jne 0x41d3f8
mov ecx, dword [ebp - 0x14]
inc edi
cmp edi, dword [esi + 0x7c4]
jl 0x41d2f0
cmp dword [esi + 0x85c], 0
jne 0x41d40e
cmp dword [esi + 0x860], 0
je 0x41d532
test eax, eax
jne 0x41d532
mov ecx, esi
call fcn.0041d5c0
cmp dword [esi + 0x684], 4
jne 0x41d438
cmp dword [esi + 0xff4], 0
jne 0x41d438
push 1
mov ecx, esi
call fcn.00422cd0
cmp dword [esi + 0x860], 0
je 0x41d49c
push str.sync_del_____sync_cp__n
call fcn.00459e20
mov eax, dword [esi + 0xb50]
add esp, 4
mov dword [esi + 0x860], 0
mov dword [eax + 0x80], 0
mov dword [eax + 0x84], 0
mov eax, dword [esi + 0xb50]
mov dword [eax + 0x78], 0
mov dword [eax + 0x7c], 0
mov eax, dword [esi + 0xb50]
mov dword [eax + 0x70], 0
mov dword [eax + 0x74], 0
jmp 0x41d4f7
cmp dword [esi + 0x85c], 0
je 0x41d4f7
push str.pre____exec_n
call fcn.00459e20
add esp, 4
mov dword [esi + 0x85c], 0
lea eax, [esi + 0xa18]
mov dword [esi + 0x864], 1
mov dword [esi + 0xb50], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [esi + 0x694]
mov dword [esi + 0xfe0], eax
and ecx, 8
xor eax, eax
or eax, ecx
je 0x41d4f7
mov dword [esi + 0x860], 1
mov ecx, esi
call fcn.00412ae0
test eax, eax
je 0x41d524
mov eax, dword [esi + 0x12d4]
lea ecx, [esi + 0x12d4]
call dword [eax + 0x20]
test eax, eax
je 0x41d524
mov eax, dword [esi + 0x12d4]
lea ecx, [esi + 0x12d4]
call dword [eax + 0x18]
mov eax, dword [esi + 0xff4]
test eax, eax
je 0x41d2d3
mov ebx, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0
push 0
push 0
push 0x11
mov ecx, esi
call fcn.00423340
cmp dword [esi + 0xffc], 0
je 0x41d558
push ecx
mov ecx, esi
call fcn.004240a0
cmp dword [esi + 0x684], 4
jne 0x41d573
cmp dword [esi + 0xff4], 0
jne 0x41d573
push 1
mov ecx, esi
call fcn.00422cd0
mov ecx, esi
call fcn.0041d5c0
mov ecx, esi
call fcn.00418ad0
mov ecx, esi
call fcn.00418a60
cmp byte [ebp - 0x20], 0
je 0x41d5a7
mov esi, dword [ebp - 0x24]
lea edi, [esi + 0xf2c]
push edi
call ebx
dec dword [esi + 0xef4]
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret