Function at 0x4615d0
Capabilities:
Get thread local storage value

Disassembly:
push edi
push esi
push ebx
sub esp, 0x20
mov eax, dword [0x5740a8]
mov dword [esp + 0x1c], eax
xor eax, eax
mov esi, dword [esp + 0x30]
mov edi, dword [esp + 0x34]
test esi, esi
je 0x461708
mov dword [esp], 0x50f178
call fcn.0045e8c0
mov eax, esi
call fcn.0045efd0
mov dword [esp], 0x50f178
mov ebx, eax
call fcn.0045ec00
test ebx, ebx
je 0x461708
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x461708
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 0x461708
test byte [ebx + 0x24], 4
jne 0x461720
call fcn.0045f6a0
mov eax, dword [0x50f180]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
test eax, eax
je 0x461740
cmp esi, dword [eax + 0xb4]
je 0x461768
mov edx, dword [ebx + 0x68]
mov eax, dword [ebx + 0x14]
test edx, edx
je 0x461687
lea edx, [eax - 1]
cmp edx, 0xfffffffd
ja 0x46169e
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 0x4616bb
mov dword [esp], eax
call esi
sub esp, 4
mov dword [ebx + 0x18], 0
lea eax, [ebx + 0x1c]
test edi, edi
je 0x461758
mov edx, dword [ebx + 4]
mov dword [edi], edx
mov dword [esp], eax
call fcn.0045ed80
lea eax, [ebx + 0x38]
mov dword [esp], eax
call fcn.0045ef40
cmp eax, 1
je 0x461774
mov eax, dword [ebx + 0xb0]
mov dword [ebx + 0x38], 0xffffffff
test eax, eax
je 0x461730
xor eax, eax
jmp 0x46170d
mov eax, 3
mov edx, dword [esp + 0x1c]
sub edx, dword [0x5740a8]
jne 0x46176f
add esp, 0x20
pop ebx
pop esi
pop edi
ret
mov eax, 0x16
jmp 0x46170d
mov eax, ebx
call fcn.0045f4e0
xor eax, eax
jmp 0x46170d
call fcn.0045f760
test eax, eax
jne 0x461669
jmp 0x461675
mov dword [esp], eax
call fcn.0045ed80
jmp 0x4616da
mov eax, 0x24
jmp 0x46170d
call fcn.00463ab0
call fcn.0045f260
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], 0x50f178
mov eax, dword [0x5740a8]
mov dword [esp + 0x1c], eax
xor eax, eax
call fcn.0045e8c0
mov eax, edi
call fcn.0045efd0
test eax, eax
je 0x4618d0
mov ebx, eax
mov eax, dword [eax + 0x14]
test eax, eax
je 0x4618d0
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 0x4618d0
mov esi, dword [ebx + 0x24]
and esi, 4
jne 0x4618e8
call fcn.0045f6a0
mov eax, dword [0x50f180]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
test eax, eax
je 0x461920
mov esi, dword [eax + 0xb4]
cmp edi, esi
je 0x461958
mov ecx, dword [ebx + 0x68]
mov eax, dword [ebx + 0x14]
test ecx, ecx
jne 0x46183f
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
sub esp, 8
test eax, eax
jne 0x461900
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 0x46185c
mov dword [esp], eax
call esi
sub esp, 4
mov dword [ebx + 0x18], 0
lea eax, [ebx + 0x1c]
test ebp, ebp
je 0x461938
mov edx, dword [ebx + 4]
mov dword [ebp], edx
mov dword [esp], eax
call fcn.0045ed80
lea eax, [ebx + 0x38]
mov dword [esp], eax
call fcn.0045ef40
cmp eax, 1
je 0x461973
mov eax, dword [ebx + 0xb0]
mov dword [ebx + 0x38], 0xffffffff
test eax, eax
je 0x461948
mov dword [esp], 0x50f178
call fcn.0045ec00
xor eax, eax
mov edx, dword [esp + 0x1c]
sub edx, dword [0x5740a8]
jne 0x46196e
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], 0x50f178
call fcn.0045ec00
mov eax, 3
jmp 0x4618b3
mov dword [esp], 0x50f178
call fcn.0045ec00
mov eax, 0x16
jmp 0x4618b3
mov edx, dword [ebx + 0x68]
test edx, edx
jne 0x46183c
mov dword [esp], 0x50f178
call fcn.0045ec00
mov eax, 0x10
jmp 0x4618b3
call fcn.0045f760
test eax, eax
jne 0x461808
jmp 0x46180e
mov dword [esp], eax
call fcn.0045ed80
jmp 0x46187c
mov eax, ebx
call fcn.0045f4e0
jmp 0x4618a5
mov dword [esp], 0x50f178
call fcn.0045ec00
mov eax, 0x24
jmp 0x4618b3
call fcn.00463ab0
call fcn.0045f260
lea esi, [esi]
nop