Function at 0x10046ec0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
push dword [0x100c7608]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x10046ee5
lea eax, [esi + 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0x8224], 0
jne 0x10047106
mov edi, dword [esi + 0x81e2]
mov ebx, dword [esi + 0x81e6]
mov dword [esi + 0x60e8], 0
mov dword [ebp - 0x10], 1
mov dword [ebp - 4], edi
mov dword [esi + 0x60ec], 0
cmp edi, ebx
je 0x1004707c
xor eax, eax
mov dword [esi + 0x28], 0
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], eax
xor ecx, ecx
test eax, eax
jne 0x1004706f
call fcn.10045da0
cmp edi, 0xffffffff
lea edi, [ebx + 1]
jne 0x10046f52
test ebx, ebx
je 0x10046f6a
xor edx, edx
jmp 0x10046f56
mov edx, dword [ebp - 4]
inc edx
push esi
mov ecx, edi
call fcn.1004cb30
add esp, 4
cmp eax, 1
jne 0x1004706a
call fcn.10045e20
cmp eax, 0xffffffff
jne 0x10046f9c
xor edx, edx
push 0x100ab578
push ecx
push 0
lea ecx, [edx + 2]
call fcn.1004be00
add esp, 0xc
xor ecx, ecx
cmp eax, 1
jne 0x1004706f
mov edi, dword [ebp - 4]
mov eax, dword [ebp - 8]
jmp 0x10046f33
mov ecx, dword [ebp - 0x10]
mov dword [esi + 0x82ac], ebx
call fcn.10047230
test eax, eax
jle 0x1004704a
mov edx, dword [ebp - 0xc]
add edx, eax
mov dword [ebp - 0xc], edx
cmp edx, dword [esi + 0x81f2]
jae 0x10046fd6
mov eax, dword [ebp - 8]
mov ebx, edi
mov edi, dword [ebp - 4]
mov dword [ebp - 0x10], 0
jmp 0x10046f33
cmp dword [ebp - 4], 0xffffffff
jne 0x10046feb
mov eax, edx
cdq
mov dword [esi + 0x81f2], eax
mov dword [esi + 0x81f6], edx
lea edi, [esi + 0x18384]
mov dword [esi + 0x8224], 1
push edi
lea eax, [esi + 0x19384]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push dword [esi + 0x1fc48]
lea edx, [esi + 0x1a3c0]
mov ecx, edi
call fcn.1004c860
mov edi, dword [ebp - 4]
mov eax, 1
add esp, 4
mov dword [esi + 0x60e8], 0
mov dword [esi + 0x60ec], 0
mov dword [ebp - 8], eax
mov dword [ebp - 0x10], 0
jmp 0x10046f33
xor edx, edx
push 0x100ab578
push ecx
push 0
lea ecx, [edx + 3]
call fcn.1004be00
mov edi, dword [ebp - 4]
add esp, 0xc
mov eax, dword [ebp - 8]
jmp 0x10046f33
mov ecx, 0x30
test ecx, ecx
jne 0x1004718e
jmp 0x10047106
mov ecx, 1
call fcn.10047230
cmp eax, dword [esi + 0x81f2]
jae 0x100470b1
xor edx, edx
push 0x100ab578
push ecx
push 0
lea ecx, [edx + 3]
call fcn.1004be00
add esp, 0xc
mov ecx, 3
mov eax, ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cdq
lea edi, [esi + 0x18384]
mov dword [esi + 0x81f2], eax
lea eax, [esi + 0x19384]
push edi
push eax
mov dword [esi + 0x81f6], edx
mov dword [esi + 0x60e8], 0
mov dword [esi + 0x60ec], 0
mov dword [esi + 0x8224], 1
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push dword [esi + 0x1fc48]
lea edx, [esi + 0x1a3c0]
mov ecx, edi
call fcn.1004c860
add esp, 4
mov edx, dword [esi + 0x60e8]
cmp edx, dword [esi + 0x81f2]
jae 0x10047189
cmp dword [esi + 0x60ec], 0
jl 0x10047189
jg 0x10047123
test edx, edx
jb 0x10047189
push esi
lea ecx, [esi + 0x8228]
call fcn.100461a0
add esp, 4
cmp word [esi + 0x8232], 0x63
jne 0x10047158
mov eax, 0x9901
cmp word [esi + 0x8276], ax
jne 0x10047158
mov ax, word [esi + 0x827f]
mov word [esi + 0x8232], ax
mov ecx, dword [esi + 0x60e8]
mov edx, 1
call fcn.10046000
test eax, eax
je 0x100470a3
add dword [esi + 0x60e8], 1
adc dword [esi + 0x60ec], 0
xor ecx, ecx
mov eax, ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, 2
pop edi
pop esi
mov eax, ecx
pop ebx
mov esp, ebp
pop ebp
ret