Function at 0x1001f1a0
Capabilities:
Get thread local storage value
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x1c
mov eax, dword [0x1002b150]
push ebx
push esi
push edi
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebp, eax
mov esi, dword [esp + 0x30]
mov ebx, dword [esp + 0x34]
mov dword [esp + 0x1c], esi
mov dword [esp + 0x18], ebx
cmp ebx, 0xa
ja 0x1001f1d7
mov eax, 0xfffffff9
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1c
ret
mov ax, word [esi]
cmp ax, 0x4949
je 0x1001f1f3
cmp ax, 0x4d4d
je 0x1001f1f3
mov eax, 0xffffffdb
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1c
ret
mov al, byte [esi]
lea edx, [esp + 0x21]
mov byte [esp + 0x20], al
lea eax, [esi + 2]
mov ecx, dword [eax]
mov dword [edx], ecx
mov ax, word [eax + 4]
mov word [edx + 4], ax
cmp byte [esp + 0x20], 0x49
je 0x1001f256
movzx ax, byte [esp + 0x21]
shl ax, 8
movzx cx, byte [esp + 0x22]
or ax, cx
xor ecx, ecx
mov word [esp + 0x21], ax
mov cl, byte [esp + 0x23]
shl ecx, 0x10
xor eax, eax
mov al, byte [esp + 0x25]
or ecx, eax
xor eax, eax
shl ecx, 8
mov al, byte [esp + 0x24]
shl eax, 0x10
or ecx, eax
xor eax, eax
mov al, byte [esp + 0x26]
or ecx, eax
mov dword [esp + 0x23], ecx
mov eax, dword [esp + 0x23]
add eax, 2
cmp eax, ebx
jb 0x1001f26e
mov eax, 0xfffffff9
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1c
ret
mov eax, dword [esp + 0x23]
add esi, eax
sub ebx, eax
cmp byte [esp + 0x20], 0x49
jne 0x1001f282
mov ax, word [esi]
jmp 0x1001f292
movzx ax, byte [esi]
shl ax, 8
movzx cx, byte [esi + 1]
or ax, cx
mov word [esp + 0x27], ax
add esi, 2
movsx edi, word [esp + 0x27]
sub ebx, 2
lea eax, [edi + edi*2]
shl eax, 2
cmp ebx, eax
jae 0x1001f2b9
mov eax, 0xfffffff9
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1c
ret
mov edx, dword [esp + 0x38]
test dl, 2
je 0x1001f318
cmp dword [esp + 0x3c], 0
je 0x1001f315
lea ecx, [eax + 4]
cmp ecx, ebx
ja 0x1001f315
cmp byte [esp + 0x20], 0x49
jne 0x1001f2dc
mov eax, dword [eax + esi]
jmp 0x1001f301
lea ebx, [eax + esi]
xor ecx, ecx
xor eax, eax
mov cl, byte [ebx]
shl ecx, 0x10
mov al, byte [ebx + 2]
or eax, ecx
xor ecx, ecx
shl eax, 8
mov cl, byte [ebx + 1]
shl ecx, 0x10
or eax, ecx
xor ecx, ecx
mov cl, byte [ebx + 3]
or eax, ecx
test eax, eax
je 0x1001f315
cmp dword [esp + 0x18], eax
jbe 0x1001f315
mov eax, dword [esp + 0x3c]
or dword [eax], 0x80
and edx, 0xfffffffd
test edx, edx
jne 0x1001f326
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1c
ret
test dl, 1
je 0x1001f570
test edi, edi
jle 0x1001f570
cmp byte [esp + 0x20], 0x49
jne 0x1001f345
xor ebx, ebx
mov bx, word [esi]
jmp 0x1001f353
xor ebx, ebx
xor eax, eax
mov bl, byte [esi]
mov al, byte [esi + 1]
shl ebx, 8
or ebx, eax
cmp ebx, 0x11a
jb 0x1001f564
cmp ebx, 0x11b
jbe 0x1001f378
cmp ebx, 0x128
je 0x1001f52b
jmp 0x1001f564
cmp byte [esp + 0x20], 0x49
jne 0x1001f387
xor eax, eax
mov ax, word [esi + 2]
jmp 0x1001f396
xor eax, eax
xor ecx, ecx
mov al, byte [esi + 2]
mov cl, byte [esi + 3]
shl eax, 8
or eax, ecx
cmp eax, 5
jne 0x1001f564
cmp byte [esp + 0x20], 0x49
jne 0x1001f3ab
mov eax, dword [esi + 8]
jmp 0x1001f3ce
xor eax, eax
xor ecx, ecx
mov al, byte [esi + 8]
mov cl, byte [esi + 0xa]
shl eax, 0x10
or eax, ecx
xor ecx, ecx
shl eax, 8
mov cl, byte [esi + 9]
shl ecx, 0x10
or eax, ecx
xor ecx, ecx
mov cl, byte [esi + 0xb]
or eax, ecx
cmp dword [esp + 0x18], eax
jbe 0x1001f564
cmp byte [esp + 0x20], 0x49
jne 0x1001f3e4
mov eax, dword [esi + 8]
jmp 0x1001f407
xor eax, eax
xor ecx, ecx
mov al, byte [esi + 8]
mov cl, byte [esi + 0xa]
shl eax, 0x10
or eax, ecx
xor ecx, ecx
shl eax, 8
mov cl, byte [esi + 9]
shl ecx, 0x10
or eax, ecx
xor ecx, ecx
mov cl, byte [esi + 0xb]
or eax, ecx
mov ecx, dword [esp + 0x1c]
add ecx, eax
cmp byte [esp + 0x20], 0x49
jne 0x1001f419
mov edx, dword [esi + 8]
jmp 0x1001f43c
xor edx, edx
xor eax, eax
mov dl, byte [esi + 8]
mov al, byte [esi + 0xa]
shl edx, 0x10
or edx, eax
xor eax, eax
shl edx, 8
mov al, byte [esi + 9]
shl eax, 0x10
or edx, eax
xor eax, eax
mov al, byte [esi + 0xb]
or edx, eax
mov eax, dword [esp + 0x18]
sub eax, edx
cmp eax, 8
jb 0x1001f564
cmp byte [esp + 0x20], 0x49
jne 0x1001f456
mov eax, dword [ecx]
jmp 0x1001f478
xor eax, eax
xor edx, edx
mov al, byte [ecx + 2]
mov dl, byte [ecx]
shl edx, 0x10
or eax, edx
xor edx, edx
shl eax, 8
mov dl, byte [ecx + 1]
shl edx, 0x10
or eax, edx
xor edx, edx
mov dl, byte [ecx + 3]
or eax, edx
cmp byte [esp + 0x20], 0x49
jne 0x1001f488
mov ecx, dword [ecx + 4]
mov dword [esp + 0x14], ecx
jmp 0x1001f4f7
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], 0
mov dl, byte [ecx + 4]
mov byte [esp + 0x10], dl
mov dl, byte [ecx + 6]
shl dword [esp + 0x10], 0x10
mov byte [esp + 0x14], dl
mov edx, dword [esp + 0x10]
or edx, dword [esp + 0x14]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], edx
mov dl, byte [ecx + 5]
mov cl, byte [ecx + 7]
mov byte [esp + 0x14], dl
shl dword [esp + 0x10], 8
shl dword [esp + 0x14], 0x10
mov edx, dword [esp + 0x10]
or edx, dword [esp + 0x14]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], edx
mov byte [esp + 0x14], cl
or edx, dword [esp + 0x14]
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], edx
cmp dword [esp + 0x14], 0
je 0x1001f564
cmp ebx, 0x11a
jne 0x1001f517
sub edx, edx
mov ecx, dword [ebp + 0x4ac]
div dword [esp + 0x14]
mov dword [ecx + 0x7c], eax
jmp 0x1001f564
sub edx, edx
mov ecx, dword [ebp + 0x4ac]
div dword [esp + 0x14]
mov dword [ecx + 0x84], eax
jmp 0x1001f564
cmp byte [esp + 0x20], 0x49
jne 0x1001f53a
xor eax, eax
mov ax, word [esi + 8]
jmp 0x1001f549
xor eax, eax
xor ecx, ecx
mov al, byte [esi + 8]
mov cl, byte [esi + 9]
shl eax, 8
or eax, ecx
cmp eax, 3
mov eax, dword [ebp + 0x4ac]
je 0x1001f55d
mov dword [eax + 0x78], 1
jmp 0x1001f564
mov dword [eax + 0x78], 2
dec edi
add esi, 0xc
test edi, edi
jne 0x1001f337
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1c
ret