Function at 0x42397b
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x20
push esi
mov esi, ecx
push edi
mov dword [ebp - 4], esi
call fcn.00424ba6
mov edi, dword [esi + 4]
push dword [edi + 0x14]
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov dword [ebp - 0x10], eax
test eax, eax
jne 0x4239d5
call dword [sym.imp.kernel32.dll_GetCurrentThreadId]
cmp eax, dword [0x47a0a0]
jne 0x4239d2
mov eax, dword [edi + 0x2c]
push eax
push dword [edi + 0x14]
mov dword [ebp - 0x1c], eax
call dword [sym.imp.kernel32.dll_TlsSetValue]
test eax, eax
je 0x4239d2
mov ecx, edi
call fcn.00424be0
cmp eax, dword [ebp - 0x1c]
je 0x4239e8
push 0x1c1449
call main
mov eax, dword [ebp - 0x10]
mov edi, dword [ebx + 8]
cmp eax, edi
je 0x4239f0
push 0x1c139c
call main
jmp 0x4239f0
mov eax, dword [edi + 0x2c]
jmp 0x4239d5
mov esi, dword [ebp - 4]
mov ecx, dword [esi + 8]
mov eax, dword [esi + 0xc]
mov dword [ebp - 0x1c], eax
mov eax, ecx
shr eax, 0x13
or edx, 0xffffffff
and eax, 0x7ff
test ecx, ecx
jns 0x423a0f
test eax, eax
je 0x423a0f
dec eax
shr ecx, 0xc
and ecx, 0x7f
sub eax, ecx
sub eax, 4
test eax, eax
jle 0x423ac5
cmp eax, 4
jbe 0x423ac0
lea eax, [ebp - 0x18]
push eax
mov dword [ebp - 0x18], 0
call dword [sym.imp.kernel32.dll_GetCurrentThread]
push eax
call dword [sym.imp.kernel32.dll_GetThreadIOPendingFlag]
test eax, eax
je 0x423a4d
cmp dword [ebp - 0x18], 0
jne 0x423a5f
push edi
push 1
mov ecx, esi
call fcn.00423fc1
test al, al
jne 0x423b92
mov esi, dword [esi + 4]
push dword [esi + 0x14]
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov edi, eax
test edi, edi
jne 0x423aae
call dword [sym.imp.kernel32.dll_GetCurrentThreadId]
cmp eax, dword [0x47a0a0]
jne 0x423aae
mov eax, dword [esi + 0x2c]
push eax
push dword [esi + 0x14]
mov dword [ebp - 0x1c], eax
call dword [sym.imp.kernel32.dll_TlsSetValue]
test eax, eax
je 0x423aae
mov ecx, esi
call fcn.00424be0
cmp eax, dword [ebp - 0x1c]
je 0x423aab
push 0x1c1449
call main
jmp 0x423aae
mov edi, dword [esi + 0x2c]
cmp edi, dword [ebx + 8]
je 0x423abd
push 0x1c139a
call main
mov esi, dword [ebp - 4]
mov edx, 0x1770
push edx
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x10]
push eax
push dword [esi + 0x50]
mov dword [ebp - 8], 0
mov dword [ebp - 0xc], 0
call dword [sym.imp.kernel32.dll_GetQueuedCompletionStatus]
mov edi, eax
test edi, edi
je 0x423af3
xor esi, esi
jmp 0x423afb
call dword [sym.imp.kernel32.dll_GetLastError]
mov esi, eax
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0xc]
cmp ecx, 4
setae al
test edi, edi
jne 0x423c0f
test edx, edx
jne 0x423c0f
test byte [0x47a0c0], 0x20
je 0x423b3d
push dword [ebp - 0x10]
push ecx
push 0x409158
push dword [0x47a0cc]
push dword [0x47a0c8]
call main
mov ecx, dword [ebp - 8]
test ecx, ecx
je 0x423b4b
push 0x1c13a3
call main
cmp esi, 0x102
je 0x423b5d
push 0x1c13c0
call main
lea eax, [ebp - 0x1c]
push eax
mov dword [ebp - 0x1c], 0
call dword [sym.imp.kernel32.dll_GetCurrentThread]
push eax
call dword [sym.imp.kernel32.dll_GetThreadIOPendingFlag]
test eax, eax
je 0x423b7f
cmp dword [ebp - 0x1c], 0
jne 0x423b9f
push dword [ebx + 8]
mov esi, dword [ebp - 4]
push 1
mov ecx, esi
call fcn.00423fc1
test al, al
je 0x423ba2
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 4
mov esi, dword [ebp - 4]
mov esi, dword [esi + 4]
push dword [esi + 0x14]
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov edi, eax
test edi, edi
jne 0x423bf1
call dword [sym.imp.kernel32.dll_GetCurrentThreadId]
cmp eax, dword [0x47a0a0]
jne 0x423bf1
mov eax, dword [esi + 0x2c]
push eax
push dword [esi + 0x14]
mov dword [ebp - 0x18], eax
call dword [sym.imp.kernel32.dll_TlsSetValue]
test eax, eax
je 0x423bf1
mov ecx, esi
call fcn.00424be0
cmp eax, dword [ebp - 0x18]
je 0x423bee
push 0x1c1449
call main
jmp 0x423bf1
mov edi, dword [esi + 0x2c]
cmp edi, dword [ebx + 8]
mov esi, dword [ebp - 4]
mov edi, dword [ebx + 8]
je 0x4239f0
push 0x1c139a
call main
jmp 0x4239f0
test al, al
je 0x423ce4
test edx, edx
jne 0x423c2b
push 0x1c13c3
call main
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0xc]
test byte [0x47a0c0], 0x10
je 0x423c54
push dword [ebp - 0x10]
push ecx
push 0x4090f8
push dword [0x47a0cc]
push dword [0x47a0c8]
call main
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0xc]
push dword [ebx + 8]
push esi
push dword [ebp - 0x10]
mov esi, dword [ebp - 4]
push ecx
push edx
mov ecx, esi
call fcn.00423421
mov edi, dword [esi + 4]
push dword [edi + 0x14]
mov dword [ebp - 0x18], eax
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x423cb8
call dword [sym.imp.kernel32.dll_GetCurrentThreadId]
cmp eax, dword [0x47a0a0]
jne 0x423cb5
mov eax, dword [edi + 0x2c]
push eax
push dword [edi + 0x14]
mov dword [ebp - 0x1c], eax
call dword [sym.imp.kernel32.dll_TlsSetValue]
test eax, eax
je 0x423cb5
mov ecx, edi
call fcn.00424be0
cmp eax, dword [ebp - 0x1c]
je 0x423cdf
push 0x1c1449
call main
mov eax, dword [ebp - 0x14]
mov edi, dword [ebx + 8]
cmp eax, edi
je 0x423cc9
push 0x1c13c7
call main
mov eax, dword [ebp - 0x18]
cmp eax, 1
je 0x4239f0
test eax, eax
je 0x423b92
jmp 0x423d32
mov eax, dword [edi + 0x2c]
jmp 0x423cb8
test byte [0x47a0c0], 0x10
je 0x423d0d
push dword [ebp - 0x10]
push ecx
push 0x409108
push dword [0x47a0cc]
push dword [0x47a0c8]
call main
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0xc]
mov edi, dword [ebx + 8]
push edi
push ecx
mov ecx, dword [ebp - 4]
push edx
call fcn.0042365a
mov esi, eax
cmp esi, 1
je 0x4239ed
cmp esi, 2
jne 0x423dce
mov esi, dword [ebp - 4]
lea ecx, [ebp - 0x14]
lea eax, [esi + 0x58]
push ecx
mov ecx, eax
mov dword [ebp - 0x14], 0
call main
mov ecx, dword [ebp - 0x14]
test ecx, ecx
je 0x423dc1
mov eax, dword [ecx]
push edi
call dword [eax + 0x78]
mov esi, dword [esi + 4]
push dword [esi + 0x14]
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov edi, eax
test edi, edi
jne 0x423da3
call dword [sym.imp.kernel32.dll_GetCurrentThreadId]
cmp eax, dword [0x47a0a0]
jne 0x423da3
mov eax, dword [esi + 0x2c]
push eax
push dword [esi + 0x14]
mov dword [ebp - 0x1c], eax
call dword [sym.imp.kernel32.dll_TlsSetValue]
test eax, eax
je 0x423da3
mov ecx, esi
call fcn.00424be0
cmp eax, dword [ebp - 0x1c]
je 0x423da0
push 0x1c1449
call main
jmp 0x423da3
mov edi, dword [esi + 0x2c]
cmp edi, dword [ebx + 8]
je 0x423db2
push 0x1c13d4
call main
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov esi, dword [ebp - 4]
mov edi, dword [ebx + 8]
push edi
mov ecx, esi
call fcn.00423868
jmp 0x423ccc
test esi, esi
je 0x423de1
cmp esi, 3
je 0x423de1
push 0x1c13ce
call main
pop edi
mov eax, esi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 4