Function at 0x43a640
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x384
push ebx
push esi
push edi
mov edi, ecx
xor ebx, ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], edi
cmp dword [edi + 0x70], ebx
je 0x43a69c
push dword [edi + 0x70]
mov eax, dword [edi + 0x74]
lea ecx, [esp + 0x14]
push ecx
call eax
add esp, 8
mov esi, dword [eax]
mov dword [eax], ebx
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x10], ebx
test ecx, ecx
je 0x43a686
mov eax, dword [ecx]
push 1
call dword [eax]
mov ecx, dword [edi + 4]
mov dword [edi + 4], esi
test ecx, ecx
je 0x43a696
mov eax, dword [ecx]
push 1
call dword [eax]
mov dword [esp + 0x1c], ebx
jmp 0x43a6ce
mov edx, dword [edi + 8]
lea ecx, [esp + 0x14]
call fcn.0043a230
mov edx, dword [eax]
mov dword [eax], ebx
mov ecx, dword [edi + 4]
mov dword [edi + 4], edx
test ecx, ecx
je 0x43a6bc
mov eax, dword [ecx]
push 1
call dword [eax]
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x14], ebx
test ecx, ecx
je 0x43a6ce
mov eax, dword [ecx]
push 1
call dword [eax]
mov eax, dword [0x4d8484]
test eax, 0xfffffffe
jne 0x43a6fa
push 0x4d8484
call fcn.0042d6a0
add esp, 4
test al, al
je 0x43a6fa
mov ecx, 0x4d8488
call fcn.00428100
mov dword [0x4d8484], eax
mov eax, dword [0x4d8484]
push edi
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
jne 0x43a74c
cmp dword [0x4d8374], 3
jg 0x43a73b
push 3
push 0x23
push 0x416758
lea ecx, [esp + 0x2c]
lea ebx, [eax + 4]
call fcn.0041b540
add eax, 8
push 0x4167a4
push eax
call fcn.004200c0
add esp, 8
test bl, 4
je 0x43a74c
lea ecx, [esp + 0x20]
and ebx, 0xfffffffb
call fcn.0041b6f0
mov eax, dword [edi + 0xcc]
mov dword [esp + 0x10], eax
lea esi, [eax + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
test bl, 8
je 0x43a774
lea ecx, [esp + 0xd0]
and ebx, 0xfffffff7
call fcn.0041b6f0
test bl, 0x10
je 0x43a788
lea ecx, [esp + 0x180]
and ebx, 0xffffffef
call fcn.0041b6f0
mov eax, dword [esp + 0x10]
cmp dword [eax + 0x34], 0
mov byte [eax + 0x42], 1
je 0x43a7dc
test bl, 0x20
je 0x43a7ae
lea ecx, [esp + 0x230]
and ebx, 0xffffffdf
call fcn.0041b6f0
mov eax, dword [esp + 0x10]
mov eax, dword [eax + 0x38]
add eax, 4
mov dword [esp + 0x14], eax
test bl, 0x40
je 0x43a7cd
lea ecx, [esp + 0x2e0]
call fcn.0041b6f0
mov eax, dword [esp + 0x14]
mov ecx, dword [eax]
mov eax, dword [ecx]
call dword [eax + 0xc]
mov eax, dword [esp + 0x10]
mov byte [eax + 0x40], 1
mov ebx, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push esi
call ebx
mov edi, dword [edi + 0xd0]
lea esi, [edi + 0x10]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push esi
mov dword [edi + 0xc], eax
call ebx
mov esi, dword [esp + 0x18]
mov ecx, dword [esi + 0xd0]
mov dword [esi + 0xd0], 0
test ecx, ecx
je 0x43a857
add ecx, 4
or eax, 0xffffffff
lock xadd dword [ecx], eax
sub eax, 1
setne al
test al, al
jne 0x43a857
test ecx, ecx
je 0x43a836
add ecx, 0xfffffffc
jmp 0x43a838
xor ecx, ecx
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, 0x417184
jne 0x43a865
push 1
call dword [eax + 8]
mov ecx, esi
call fcn.0043a870
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, esi
call fcn.0043a870
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call edx
jmp 0x43a857