Function at 0x1005a1e0
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 0x70
mov eax, dword [0x1007e5f0]
xor eax, esp
mov dword [esp + 0x6c], eax
mov eax, dword [0x1007eed0]
push ebx
mov ebx, dword [esp + 0x7c]
push ebp
push esi
push edi
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
xor ebp, ebp
cmp ebx, ebp
mov esi, eax
mov dword [esp + 0x1c], esi
mov dword [esp + 0x10], ebp
mov dword [esp + 0x18], ebp
mov dword [esp + 0x40], ebp
mov dword [esp + 0x48], ebp
mov dword [esp + 0x14], ebp
mov dword [esp + 0x4c], ebp
je 0x1005a299
mov eax, dword [ebx + 0x10]
cdq
mov ecx, 0x25
idiv ecx
cmp dword [edx*4 + 0x100746d0], ebp
mov eax, dword [edx*4 + 0x10076508]
mov dword [esp + 0x48], eax
jne 0x1005a24c
lea ecx, [ebx + 0x3a]
mov dword [esp + 0x14], ecx
mov eax, dword [esp + 0x8c]
cmp eax, 0xffffffff
je 0x1005a25c
cmp eax, ebp
jne 0x1005a299
lea edx, [esp + 0x44]
push edx
lea eax, [esp + 0x90]
push eax
push ebp
push ebx
call fcn.10055b20
mov eax, dword [esp + 0x8c]
cmp eax, 0xffffffff
je 0x1005a280
cmp eax, ebp
jne 0x1005a299
mov eax, dword [ebx + 0x1c]
cmp eax, ebp
jne 0x1005a28f
push 0x11
push ebx
call fcn.10055ad0
mov ecx, dword [eax + 0x70]
mov dword [esp + 0x8c], ecx
xor eax, eax
push 0x400
mov dword [esp + 0x24], eax
push esi
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x28], 0x20
call fcn.10069dc0
mov edi, eax
cmp edi, ebp
mov dword [esp + 0x44], edi
je 0x1005a40d
push 0x400
push esi
call fcn.10069dc0
cmp eax, ebp
mov dword [esp + 0x34], eax
je 0x1005a40d
push 0x400
push esi
call fcn.10069dc0
cmp eax, ebp
mov dword [esp + 0x38], eax
je 0x1005a40d
push 4
push esi
call fcn.10069dc0
cmp eax, ebp
mov dword [esp + 0x3c], eax
je 0x1005a40d
mov word [edi], bp
mov eax, dword [esp + 0x8c]
cmp eax, 0xffffffff
mov ebp, dword [esp + 0x84]
je 0x1005a36e
mov ecx, dword [esp + 0x3c]
lea edx, [esp + 0x40]
push edx
mov edx, dword [esp + 0x3c]
push 2
push ecx
mov ecx, dword [esp + 0x40]
push 0x200
push edx
push 0x200
push ecx
push 0x14
lea edx, [esp + 0x40]
push edx
push eax
mov dword [esp + 0x48], 0x14
call dword [0x1007ef94]
test eax, eax
je 0x1005a3d5
mov eax, dword [esp + 0x34]
mov dword [esp + 0x24], ebp
mov word [eax], 0
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0x90]
test eax, eax
mov word [ecx], 0
mov edx, dword [esp + 0x3c]
mov word [edx], 0
je 0x1005a3a8
push 0x200
push eax
mov eax, dword [esp + 0x3c]
push eax
call fcn.1005a020
mov eax, dword [esp + 0x48]
test eax, eax
je 0x1005a3c0
mov ecx, dword [esp + 0x38]
push 0x200
push eax
push ecx
call fcn.1005a020
mov eax, dword [esp + 0x14]
test eax, eax
je 0x1005a3d5
mov edx, dword [esp + 0x3c]
push 2
push eax
push edx
call fcn.1005a020
cmp dword [esp + 0x8c], 0xffffffff
mov dword [esp + 0x20], 0x20
je 0x1005a4e7
cmp dword [esp + 0x40], 0
je 0x1005a4e7
push 0x402
push esi
call fcn.10069dc0
mov esi, eax
test esi, esi
jne 0x1005a466
mov esi, dword [esp + 0x1c]
xor ebp, ebp
mov dword [esp + 0x10], 7
cmp edi, ebp
je 0x1005a420
push edi
push esi
call fcn.1006a020
mov eax, dword [esp + 0x34]
cmp eax, ebp
je 0x1005a42f
push eax
push esi
call fcn.1006a020
mov eax, dword [esp + 0x38]
cmp eax, ebp
je 0x1005a43e
push eax
push esi
call fcn.1006a020
mov eax, dword [esp + 0x3c]
cmp eax, ebp
je 0x1005a44d
push eax
push esi
call fcn.1006a020
mov ecx, dword [esp + 0x7c]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.1006ac47
add esp, 0x70
ret 0x10
lea eax, [esp + 0x14]
push eax
mov eax, dword [esp + 0x90]
lea ecx, [esp + 0x58]
push ecx
lea edx, [esp + 0x20]
push edx
push 0x200
push esi
mov edi, 1
push edi
push eax
call dword [0x1007ef98]
test eax, eax
jne 0x1005a4d4
mov ecx, dword [esp + 0x14]
push ebp
push 0
push 0
push esi
push str.ODBC
push ecx
push ebx
call fcn.1005a040
lea edx, [esp + 0x14]
push edx
mov edx, dword [esp + 0x90]
lea eax, [esp + 0x58]
push eax
lea ecx, [esp + 0x20]
push ecx
push 0x200
push esi
add edi, 1
push edi
push edx
call dword [0x1007ef98]
test eax, eax
je 0x1005a493
mov eax, dword [esp + 0x1c]
push esi
push eax
call fcn.1006a020
mov edi, dword [esp + 0x44]
mov esi, dword [esp + 0x1c]
push ebx
call fcn.10058c20
test eax, eax
mov dword [esp + 0x10], eax
je 0x1005a506
push ebx
call fcn.10019ae0
mov dword [esp + 0x10], eax
xor ebp, ebp
jmp 0x1005a415
lea ecx, [esp + 0x4c]
push ecx
lea edx, [esp + 0x54]
push edx
lea eax, [esp + 0x20]
push eax
push 0x200
push edi
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x38]
push edx
push ebp
call dword [0x1007eee8]
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x4c]
mov edx, dword [esp + 0x10]
push ebp
push eax
push ecx
push edi
push 0x10076de0
push edx
push ebx
call fcn.1005a040
xor ebp, ebp
jmp 0x1005a415