Function at 0x597ca0
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 0x28
push ebx
push ebp
mov ebp, dword [esp + 0x40]
push esi
mov esi, ecx
mov dword [esp + 0x18], esi
push edi
test ebp, ebp
jne 0x597cc6
mov ecx, dword [0x884f00]
mov eax, dword [ecx]
call dword [eax + 0x14]
mov ebp, eax
mov dword [esp + 0x48], ebp
cmp dword [esp + 0x4c], 0
jne 0x597cdc
mov ecx, dword [0x884f00]
mov edx, dword [ecx]
call dword [edx + 0xc]
mov dword [esp + 0x4c], eax
mov edi, dword [esp + 0x50]
test edi, edi
jne 0x597ce7
mov edi, dword [esi + 0x4c]
mov eax, dword [esp + 0x54]
lea ebx, [esp + 0x2c]
test eax, eax
mov dword [esp + 0x20], 0
push 0
cmovne ebx, eax
mov dword [esp + 0x28], 0
push esi
mov ecx, ebx
mov dword [esp + 0x30], 0xffffffff
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x3c], 0xffffffff
mov dword [esp + 0x1c], ebx
call fcn.0046b890
mov esi, eax
test esi, esi
jne 0x598025
push ecx
mov eax, esp
push dword [esp + 0x50]
push ebp
mov dword [eax], 2
lea eax, [esp + 0x2c]
push eax
push 0x8d1f88
push edi
call fcn.0049dc70
mov ecx, dword [esp + 0x38]
mov edi, eax
mov eax, dword [esp + 0x40]
add esp, 0x18
mov dword [esp + 0x18], edi
test eax, eax
js 0x597d7b
nop
cmp dword [ecx + esi*8], 0xffffffff
jne 0x597d7b
inc esi
cmp esi, eax
jle 0x597d70
cmp esi, eax
setle al
test al, al
je 0x597f97
mov ebx, dword [ecx + esi*8]
mov ecx, ebp
mov eax, dword [ebp]
push ebx
call dword [eax + 0x10]
mov edi, eax
test edi, edi
je 0x597f6a
cmp byte [esp + 0x3c], 0
je 0x597e17
push edi
lea eax, [esp + 0x54]
mov ecx, 0x8d1d00
push eax
call fcn.0045dcb0
cmp byte [eax], 0
je 0x597e17
mov edi, dword [ebx + 0x58]
test edi, edi
je 0x597f6a
mov eax, dword [esp + 0x20]
push dword [0x884adc]
mov ebx, dword [eax + esi*8 + 4]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push 0xa0
mov ecx, dword [eax + 0x2c]
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, 0xa0
push 0xffffffffffffffff
push ecx
mov edx, esp
mov word [eax + 4], cx
mov ecx, eax
mov byte [edx], 1
push dword [edi + 0x28]
call fcn.006fec60
mov edi, eax
mov ecx, ebx
push edi
call fcn.0059feb0
mov ecx, edi
call fcn.0045c160
jmp 0x597f6a
cmp byte [esp + 0x44], 0
je 0x597ebf
push edi
lea eax, [esp + 0x58]
mov ecx, 0x8d1b08
push eax
call fcn.0045dcb0
cmp byte [eax], 0
je 0x597ebf
mov ecx, dword [ebx + 0x2c]
test ecx, ecx
je 0x597f6a
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x14]
push 0
push ecx
mov ebp, dword [eax + esi*8 + 4]
mov ecx, edi
call fcn.0046b890
test eax, eax
jne 0x597eac
mov ecx, dword [ebx + 0x2c]
push edi
push eax
push dword [esp + 0x54]
push dword [esp + 0x54]
push dword [esp + 0x54]
push dword [esp + 0x54]
push dword [esp + 0x54]
call fcn.00597ca0
mov edi, eax
push edi
push dword [ebx + 0x2c]
mov ebx, dword [esp + 0x1c]
mov ecx, ebx
push 0x7d8954
call fcn.0046ba50
push edi
mov ecx, ebp
call fcn.0059c900
mov ecx, edi
call fcn.0045c160
mov ebp, dword [esp + 0x48]
jmp 0x597f6e
push eax
mov ecx, ebp
call fcn.0059c900
mov ebp, dword [esp + 0x48]
mov ebx, edi
jmp 0x597f6e
cmp byte [esp + 0x40], 0
je 0x597f0b
push edi
lea eax, [esp + 0x16]
mov ecx, 0x8d1250
push eax
call fcn.0045dcb0
cmp byte [eax], 0
je 0x597f0b
test ebx, ebx
je 0x597f6a
mov eax, dword [esp + 0x20]
push dword [ebx + 0x68]
mov edi, dword [eax + esi*8 + 4]
mov ecx, edi
call fcn.005984f0
push dword [ebx + 0x6c]
mov ecx, edi
call fcn.00598520
push dword [ebx + 0x70]
mov ecx, edi
call fcn.00598550
jmp 0x597f6a
push edi
lea eax, [esp + 0x17]
mov ecx, 0x8d354c
push eax
call fcn.0045dcb0
cmp byte [eax], 0
je 0x597f6a
test ebx, ebx
je 0x597f6a
mov eax, dword [esp + 0x20]
mov ebp, dword [ebx + 0x6c]
mov edi, dword [eax + esi*8 + 4]
test ebp, ebp
je 0x597f3a
mov ecx, ebp
call fcn.0045c0c0
mov ecx, dword [edi + 0x6c]
test ecx, ecx
je 0x597f46
call fcn.0045c160
mov dword [edi + 0x6c], ebp
mov ebx, dword [ebx + 0x68]
test ebx, ebx
je 0x597f57
mov ecx, ebx
call fcn.0045c0c0
mov ecx, dword [edi + 0x68]
test ecx, ecx
je 0x597f63
call fcn.0045c160
mov ebp, dword [esp + 0x48]
mov dword [edi + 0x68], ebx
mov ebx, dword [esp + 0x14]
mov eax, dword [esp + 0x28]
inc esi
mov ecx, dword [esp + 0x20]
cmp esi, eax
jg 0x597f93
nop dword [eax + eax]
cmp dword [ecx + esi*8], 0xffffffff
jne 0x597f8b
inc esi
cmp esi, eax
jle 0x597f80
cmp esi, eax
jle 0x597d88
mov edi, dword [esp + 0x18]
push dword [0x884adc]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push 0xb0
mov ecx, dword [eax + 0x2c]
mov eax, dword [ecx]
call dword [eax + 4]
mov ebp, dword [esp + 0x1c]
mov ecx, 0xb0
push 1
mov word [eax + 4], cx
mov ecx, eax
push dword [ebp + 0x50]
push edi
call fcn.00599720
mov esi, eax
mov ecx, edi
mov dword [esi + 0x54], edi
call fcn.0045c160
lea eax, [ebp + 0x20]
push eax
lea ecx, [esi + 0x20]
call fcn.0045d9c0
cmp byte [esp + 0x40], 0
mov al, byte [ebp + 0x28]
mov byte [esi + 0x28], al
je 0x598017
push dword [ebp + 0x68]
mov ecx, esi
call fcn.005984f0
push dword [ebp + 0x6c]
mov ecx, esi
call fcn.00598520
push dword [ebp + 0x70]
mov ecx, esi
call fcn.00598550
push dword [ebp + 0x74]
mov ecx, esi
call fcn.00598580
push esi
push ebp
push 0x7d8954
mov ecx, ebx
call fcn.0046ba50
push 0x7d8954
lea ecx, [esp + 0x30]
call fcn.0046b3e0
lea ecx, [esp + 0x2c]
call fcn.0046b110
push 0x7d8954
lea ecx, [esp + 0x24]
call fcn.0046b3e0
lea ecx, [esp + 0x20]
call fcn.0046b110
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret 0x1c