Function at 0x423180
Capabilities:
Get thread local storage value

Disassembly:
push edi
push esi
push ebx
sub esp, 0x20
mov eax, dword [0x529fe8]
mov dword [esp + 0x1c], eax
xor eax, eax
mov esi, dword [esp + 0x30]
mov edi, dword [esp + 0x34]
test esi, esi
je 0x4232b8
mov dword [esp], 0x4cf0cc
call fcn.00420470
mov eax, esi
call fcn.00420b80
mov dword [esp], 0x4cf0cc
mov ebx, eax
call fcn.004207b0
test ebx, ebx
je 0x4232b8
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x4232b8
lea edx, [esp + 0x18]
mov dword [esp], eax
mov dword [esp + 4], edx
call dword [sym.imp.KERNEL32.dll_GetHandleInformation]
sub esp, 8
test eax, eax
je 0x4232b8
test byte [ebx + 0x24], 4
jne 0x4232d0
call fcn.00421250
mov eax, dword [0x4cf0d4]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
test eax, eax
je 0x4232f0
cmp esi, dword [eax + 0xb4]
je 0x423318
mov edx, dword [ebx + 0x68]
mov eax, dword [ebx + 0x14]
test edx, edx
je 0x423237
lea edx, [eax - 1]
cmp edx, 0xfffffffd
ja 0x42324e
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [ebx + 0x14]
sub esp, 8
mov dword [esp], eax
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
mov eax, dword [ebx + 0x18]
sub esp, 4
test eax, eax
je 0x42326b
mov dword [esp], eax
call esi
sub esp, 4
mov dword [ebx + 0x18], 0
lea eax, [ebx + 0x1c]
test edi, edi
je 0x423308
mov edx, dword [ebx + 4]
mov dword [edi], edx
mov dword [esp], eax
call fcn.00420930
lea eax, [ebx + 0x38]
mov dword [esp], eax
call fcn.00420af0
cmp eax, 1
je 0x423324
mov eax, dword [ebx + 0xb0]
mov dword [ebx + 0x38], 0xffffffff
test eax, eax
je 0x4232e0
xor eax, eax
jmp 0x4232bd
mov eax, 3
mov edx, dword [esp + 0x1c]
sub edx, dword [0x529fe8]
jne 0x42331f
add esp, 0x20
pop ebx
pop esi
pop edi
ret
mov eax, 0x16
jmp 0x4232bd
mov eax, ebx
call fcn.00421090
xor eax, eax
jmp 0x4232bd
call fcn.00421310
test eax, eax
jne 0x423219
jmp 0x423225
mov dword [esp], eax
call fcn.00420930
jmp 0x42328a
mov eax, 0x24
jmp 0x4232bd
call fcn.00425650
call fcn.00420e10
lea esi, [esi]
push ebp
push edi
push esi
push ebx
sub esp, 0x2c
mov edi, dword [esp + 0x40]
mov ebp, dword [esp + 0x44]
mov dword [esp], 0x4cf0cc
mov eax, dword [0x529fe8]
mov dword [esp + 0x1c], eax
xor eax, eax
call fcn.00420470
mov eax, edi
call fcn.00420b80
test eax, eax
je 0x423480
mov ebx, eax
mov eax, dword [eax + 0x14]
test eax, eax
je 0x423480
lea edx, [esp + 0x18]
mov dword [esp], eax
mov dword [esp + 4], edx
call dword [sym.imp.KERNEL32.dll_GetHandleInformation]
sub esp, 8
test eax, eax
je 0x423480
mov esi, dword [ebx + 0x24]
and esi, 4
jne 0x423498
call fcn.00421250
mov eax, dword [0x4cf0d4]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
test eax, eax
je 0x4234d0
mov esi, dword [eax + 0xb4]
cmp edi, esi
je 0x423508
mov ecx, dword [ebx + 0x68]
mov eax, dword [ebx + 0x14]
test ecx, ecx
jne 0x4233ef
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
sub esp, 8
test eax, eax
jne 0x4234b0
mov eax, dword [ebx + 0x14]
mov dword [esp], eax
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
mov eax, dword [ebx + 0x18]
sub esp, 4
test eax, eax
je 0x42340c
mov dword [esp], eax
call esi
sub esp, 4
mov dword [ebx + 0x18], 0
lea eax, [ebx + 0x1c]
test ebp, ebp
je 0x4234e8
mov edx, dword [ebx + 4]
mov dword [ebp], edx
mov dword [esp], eax
call fcn.00420930
lea eax, [ebx + 0x38]
mov dword [esp], eax
call fcn.00420af0
cmp eax, 1
je 0x423523
mov eax, dword [ebx + 0xb0]
mov dword [ebx + 0x38], 0xffffffff
test eax, eax
je 0x4234f8
mov dword [esp], 0x4cf0cc
call fcn.004207b0
xor eax, eax
mov edx, dword [esp + 0x1c]
sub edx, dword [0x529fe8]
jne 0x42351e
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], 0x4cf0cc
call fcn.004207b0
mov eax, 3
jmp 0x423463
mov dword [esp], 0x4cf0cc
call fcn.004207b0
mov eax, 0x16
jmp 0x423463
mov edx, dword [ebx + 0x68]
test edx, edx
jne 0x4233ec
mov dword [esp], 0x4cf0cc
call fcn.004207b0
mov eax, 0x10
jmp 0x423463
call fcn.00421310
test eax, eax
jne 0x4233b8
jmp 0x4233be
mov dword [esp], eax
call fcn.00420930
jmp 0x42342c
mov eax, ebx
call fcn.00421090
jmp 0x423455
mov dword [esp], 0x4cf0cc
call fcn.004207b0
mov eax, 0x24
jmp 0x423463
call fcn.00425650
call fcn.00420e10
lea esi, [esi]
nop