Function at 0x1005ef70
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 0x28
push ebx
or eax, 0xffffffff
push esi
mov esi, dword [esp + 0x4c]
mov ebx, dword [esi + 0x18]
push edi
xor edi, edi
mov dword [esp + 0x28], eax
mov dword [esp + 0x30], eax
mov eax, dword [esi + 0x1c]
cmp eax, edi
mov dword [esp + 0x20], edi
mov dword [esp + 0xc], edi
mov dword [esp + 0x14], edi
mov dword [esp + 0x24], edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x18], ebx
jne 0x1005efd2
push 0x11
push esi
call fcn.10055ad0
cmp eax, edi
jne 0x1005efd2
push ebx
call fcn.1004b060
push 1
push edi
push esi
push 0xfffffbfb
call fcn.1005a550
pop edi
pop esi
pop ebx
add esp, 0x28
ret 0x20
mov eax, dword [esi + 0xec]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x4c]
cmp eax, 0xffffffff
push ebp
jne 0x1005f42a
mov eax, dword [esp + 0x58]
cmp eax, edi
je 0x1005effb
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
jmp 0x1005f005
mov ecx, dword [esp + 0x40]
push ecx
call fcn.10020570
cmp word [esp + 0x4c], 3
mov ebp, eax
mov dword [esp + 0x50], ebp
jbe 0x1005f01f
mov edx, dword [esp + 0x44]
push edx
call fcn.10020570
mov edi, eax
lea ebx, [edi + ebp + 0xa]
lea eax, [ebx + 0x201]
cmp eax, 0x201
jae 0x1005f041
push 1
push 0
push esi
push 0xfffffbf2
call fcn.1005a550
jmp 0x1005f043
mov ebx, eax
cmp ebp, 0x104
jbe 0x1005f05c
push 1
push 0
push esi
push 0xfffffbec
call fcn.1005a550
jmp 0x1005f084
cmp edi, 0x10e
jbe 0x1005f075
push 1
push 0
push esi
push 0xfffffc15
call fcn.10007380
jmp 0x1005f084
mov ecx, dword [esp + 0x1c]
lea eax, [ebx + ebx]
push eax
push esi
push ecx
call fcn.1004af50
mov esi, eax
test esi, esi
je 0x1005f0c5
cmp dword [esp + 0x58], 0
jne 0x1005f09f
mov edx, dword [esp + 0x40]
push 0
push 0
push edx
call fcn.100205a0
cmp word [esp + 0x4c], 3
jbe 0x1005f6f5
mov eax, dword [esp + 0x44]
push 0
push 0
push eax
call fcn.100205a0
pop ebp
pop edi
mov eax, esi
pop esi
pop ebx
add esp, 0x28
ret 0x20
mov ecx, dword [0x1007eed0]
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
push ecx
call ebp
mov edx, dword [0x1007eed0]
mov esi, dword [eax + 0x38]
push edx
add esi, 0xa
call ebp
cmp word [esp + 0x4c], 3
mov ecx, dword [0x10076f90]
mov eax, dword [eax + 0x38]
mov dword [eax], ecx
mov edx, dword [0x10076f94]
mov dword [eax + 4], edx
mov cx, word [0x10076f98]
mov word [eax + 8], cx
jbe 0x1005f137
mov ecx, dword [esp + 0x44]
lea edx, [edi + 1]
movzx eax, dx
push eax
push esi
push ecx
call fcn.100205a0
test edi, edi
je 0x1005f137
cmp word [esi + edi*2 - 2], 0x3b
je 0x1005f137
mov word [esi + edi*2], 0x3b
add edi, 1
mov word [esi + edi*2], 0
cmp dword [esp + 0x58], 0
mov edx, dword [str.DSN]
mov dword [esi + edi*2], edx
mov eax, dword [0x10076f64]
mov dword [esi + edi*2 + 4], eax
lea ebp, [esi + edi*2 + 8]
je 0x1005f1a4
mov ecx, dword [0x1007eed0]
push ecx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edx, ebp
sub edx, dword [eax + 0x38]
sar edx, 1
cmp ebx, edx
jbe 0x1005f18f
mov eax, dword [0x1007eed0]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edx, dword [esp + 0x58]
mov ecx, ebp
sub ecx, dword [eax + 0x38]
sar ecx, 1
sub ebx, ecx
push ebx
push edx
push ebp
call fcn.10001df0
jmp 0x1005f1c4
mov eax, dword [esp + 0x54]
push 1
push 0
push eax
push 0xfffffbf2
call fcn.1005a550
jmp 0x1005f1c4
mov ebx, dword [esp + 0x50]
mov edx, dword [esp + 0x40]
movzx ecx, bx
push ecx
push ebp
push edx
call fcn.100205a0
lea ebx, [ebp + ebx*2]
mov dword [esp + 0x58], ebx
mov word [ebx], 0
mov ebx, 1
cmp word [esp + 0x4c], bx
jbe 0x1005f1d8
mov eax, dword [esp + 0x48]
mov dword [esp + 0x24], eax
test edi, edi
jne 0x1005f2a0
cmp dword [esp + 0x50], edi
jne 0x1005f203
mov ecx, dword [0x1007eed0]
push ecx
mov dword [esp + 0x1c], ebx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, dword [eax + 0x38]
mov word [esi + 0xa], di
jmp 0x1005f333
mov esi, dword [esp + 0x58]
mov ebx, dword [esp + 0x14]
mov ecx, dword [esp + 0x24]
push ecx
lea edx, [esp + 0x24]
push edx
push esi
push ebp
push ebx
call dword [0x1007efe8]
mov edi, eax
test edi, edi
jge 0x1005f3a3
cmp edi, 0xfffff8ed
jne 0x1005f262
push 0
push ebp
call fcn.1005d220
mov ebx, eax
test ebx, ebx
je 0x1005f276
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x14]
push eax
lea ecx, [esp + 0x24]
push ecx
push esi
push ebx
push edx
call dword [0x1007efe8]
push ebx
mov edi, eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov ebx, dword [esp + 0x14]
test edi, edi
jge 0x1005f3a3
cmp edi, 0xfffff8ed
jne 0x1005f37a
mov eax, dword [esp + 0x54]
push 1
push ebp
push eax
push 0xfffff8ed
call fcn.1005a550
mov esi, eax
mov eax, dword [esp + 0x1c]
push eax
call fcn.1004b060
pop ebp
pop edi
mov eax, esi
pop esi
pop ebx
add esp, 0x28
ret 0x20
push 0
push 0
push 5
push esi
push 0x10076f90
call fcn.10056a90
test eax, eax
jne 0x1005f2c9
cmp dword [esp + 0x50], eax
mov dword [esp + 0x18], ebx
jne 0x1005f2c3
mov word [esi + edi*2], ax
mov ebp, dword [esp + 0x58]
jmp 0x1005f333
movzx eax, word [esi]
test ax, ax
mov ebx, esi
je 0x1005f31c
movzx eax, ax
cmp ax, 0x3b
je 0x1005f322
cmp ax, 0x3d
je 0x1005f2f0
movzx eax, word [ebx + 2]
add ebx, 2
test ax, ax
jne 0x1005f2d6
jmp 0x1005f31c
mov edx, dword [0x1007eed0]
push edx
mov dword [esp + 0x1c], 1
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, dword [eax + 0x38]
add edi, 5
cmp dword [esp + 0x50], 0
jne 0x1005f318
mov word [esi + edi*2], 0
mov ebp, dword [esp + 0x58]
cmp word [ebx], 0x3b
jne 0x1005f328
mov word [esi + edi*2], 0
cmp dword [esp + 0x18], 0
je 0x1005f207
test esi, esi
je 0x1005f207
mov ebx, dword [esp + 0x14]
mov edi, dword [esp + 0x54]
lea eax, [esp + 0x2c]
push eax
push esi
push ebx
push edi
call fcn.1005ddc0
test eax, eax
je 0x1005f20b
jge 0x1005f36e
push 0
push ebx
push edi
push eax
call fcn.1005a1e0
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x28
ret 0x20
pop ebp
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x28
ret 0x20
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x54]
push ebp
push ecx
push edx
push edi
call fcn.1005a1e0
mov esi, eax
mov eax, dword [esp + 0x1c]
push eax
call fcn.1004b060
pop ebp
pop edi
mov eax, esi
pop esi
pop ebx
add esp, 0x28
ret 0x20
xor ecx, ecx
cmp edi, 0x4b8
sete cl
cmp dword [esp + 0x18], 0
mov dword [esp + 0x28], ecx
je 0x1005f48c
test esi, esi
je 0x1005f48c
mov eax, dword [esp + 0x1c]
mov ebp, dword [esp + 0x54]
movzx edi, word [eax + 0x34]
push 0x400
push ebp
push eax
call fcn.1004af50
mov esi, eax
test esi, esi
jne 0x1005f4a3
mov eax, dword [0x1007eed0]
mov esi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
movzx edx, di
push 1
push edx
push eax
call esi
mov ecx, dword [eax + 0x38]
mov edx, dword [esp + 0x28]
push ecx
push edx
push ebx
call dword [0x1007ef88]
test eax, eax
jge 0x1005f420
push 0
push ebx
push ebp
push eax
call fcn.1005a1e0
mov esi, eax
jmp 0x1005f4a3
mov eax, dword [0x1007eed0]
push eax
call esi
jmp 0x1005f48c
push 0x400
push esi
push ebx
mov dword [esp + 0x2c], eax
call fcn.1004af50
mov esi, eax
cmp esi, edi
jne 0x1005f4a3
mov eax, dword [0x1007eed0]
mov edi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, ebx
movzx edx, word [ecx + 0x34]
push 1
push edx
push eax
call edi
mov ecx, dword [eax + 0x38]
mov edx, dword [esp + 0x28]
mov esi, dword [esp + 0x1c]
push ecx
push edx
push esi
call dword [0x1007ef88]
test eax, eax
jge 0x1005f481
mov ecx, dword [esp + 0x54]
push 0
push esi
push ecx
push eax
call fcn.1005a1e0
mov esi, eax
jmp 0x1005f4a3
mov edx, dword [0x1007eed0]
push edx
call edi
mov ebx, esi
mov ecx, dword [esp + 0x54]
push 1
lea eax, [esp + 0x14]
push eax
push ecx
call fcn.10057aa0
mov esi, eax
test esi, esi
je 0x1005f4cb
mov edx, dword [esp + 0x1c]
push edx
call fcn.1004b060
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x14]
push 0
push eax
push ecx
call dword [0x1007ef18]
pop ebp
pop edi
mov eax, esi
pop esi
pop ebx
add esp, 0x28
ret 0x20
mov ebp, dword [esp + 0x18]
test ebp, ebp
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x28]
mov dword [edx + 0x4b4], eax
je 0x1005f4ec
mov eax, dword [esp + 0x10]
or dword [eax + 0x4a4], 2
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.1004b060
mov edi, dword [esp + 0x2c]
cmp di, 0xffff
je 0x1005f51c
mov edx, dword [esp + 0x54]
mov eax, dword [edx + 0x1c]
test eax, eax
jne 0x1005f515
push 0x11
mov eax, edx
push eax
call fcn.10055ad0
mov word [eax + 0x88], di
mov ecx, dword [esp + 0x10]
mov dword [ecx + 0x478], 0xffffffff
mov edx, dword [esp + 0x10]
mov dword [edx + 0x48c], ebp
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x20]
mov dword [eax + 0x494], ecx
mov edx, dword [esp + 0x10]
push 0x12
push 4
mov dword [edx + 0x4a0], ebx
lea eax, [esp + 0x38]
push eax
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + 0x494]
mov edx, dword [eax + 0x4a0]
push ecx
push edx
call dword [0x1007ef88]
test eax, eax
jne 0x1005f581
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x30]
mov dword [eax + 0x4b8], ecx
jmp 0x1005f58f
mov edx, dword [esp + 0x10]
mov dword [edx + 0x4b8], 0x800
mov ecx, dword [esp + 0x10]
cmp dword [ecx + 0x1c], 0
je 0x1005f59e
mov eax, dword [ecx + 0x1c]
jmp 0x1005f5aa
push 0x11
push ecx
call fcn.10055ad0
mov ecx, dword [esp + 0x10]
mov ecx, dword [ecx + 0x4a0]
push 0
push 0
lea edx, [esp + 0x3c]
push edx
mov edx, dword [eax + 0x6c]
push 7
push ecx
push edx
call dword [0x1007efb4]
test eax, eax
jne 0x1005f5da
mov eax, dword [esp + 0x10]
mov cx, word [esp + 0x34]
mov word [eax + 0x4a8], cx
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + 0x494]
push 0
push 0x209
lea edx, [eax + 0x3a]
push edx
mov edx, dword [eax + 0x4a0]
push ecx
push edx
call dword [0x1007ef88]
test eax, eax
jge 0x1005f617
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx + 0x4a0]
push 0
push edx
push ecx
push eax
call fcn.1005a1e0
mov esi, eax
test esi, esi
jne 0x1005f6e7
mov eax, dword [esp + 0x10]
mov edx, dword [eax + 0x494]
push 1
push 0x1fd
lea ecx, [eax + 0x244]
mov eax, dword [eax + 0x4a0]
push ecx
push edx
push eax
call dword [0x1007ef88]
test eax, eax
jge 0x1005f66f
cmp eax, 0xfffffbf2
jne 0x1005f655
mov eax, 0xfffff412
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx + 0x4a0]
push 0
push edx
push ecx
push eax
call fcn.1005a1e0
mov esi, eax
test esi, esi
jne 0x1005f6e7
mov eax, dword [esp + 0x10]
add eax, 0x3a
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x54]
mov word [ecx + 0x38], ax
mov eax, dword [esp + 0x10]
mov esi, dword [edx + 0x100]
add eax, 0x244
cmp word [eax], 0
je 0x1005f6c0
push 3
push 0x10076ff8
push eax
call sub.msvcrt.dll__wcsnicmp
add esp, 0xc
test eax, eax
je 0x1005f6c0
mov eax, dword [esp + 0x10]
mov dword [eax + 0x4b0], 0
mov ecx, dword [esp + 0x10]
push ecx
push esi
call fcn.1005d910
mov esi, eax
test esi, esi
jne 0x1005f6e7
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x3c]
pop ebp
pop edi
mov dword [edx], eax
mov eax, esi
pop esi
pop ebx
add esp, 0x28
ret 0x20
mov eax, dword [esp + 0x10]
test eax, eax
je 0x1005f6f5
push eax
call fcn.10007380
pop ebp
pop edi
mov eax, esi
pop esi
pop ebx
add esp, 0x28
ret 0x20