Function at 0x1001b361
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
push ebx
push esi
push edi
push 0x100e3d7c
mov edi, ecx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebp + 0x18]
xor ebx, ebx
cmp eax, ebx
mov dword [ebp - 0xc], 0x100e2cf8
jne 0x1001b39b
push dword [0x100e2bdc]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, ebx
je 0x1001b3a3
cmp dword [eax], ebx
jmp 0x1001b39e
cmp eax, 0xffffffff
je 0x1001b3a3
mov dword [ebp - 0xc], eax
mov esi, dword [ebp - 0xc]
mov al, byte [edi + 0xc]
add esi, 4
test al, 0x20
jne 0x1001b3b9
test byte [ebp + 0x12], 1
mov dword [ebp - 0x18], ebx
je 0x1001b3c0
mov dword [ebp - 0x18], 1
test al, 0x40
jne 0x1001b3cd
test byte [ebp + 0x12], 2
mov dword [ebp - 0x10], ebx
je 0x1001b3d4
mov dword [ebp - 0x10], 1
mov eax, dword [ebp + 0x10]
push dword [ebp + 8]
and eax, 0x2020
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0x10]
and eax, 0x1010
mov word [ebp - 0x44], bx
mov dword [ebp - 0x20], eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [esi + 8]
mov ebx, eax
mov eax, dword [esi + 4]
sub ecx, eax
lea edx, [ebx + 0x532]
cmp ecx, edx
mov dword [ebp - 0x24], ebx
jge 0x1001b420
lea eax, [eax + ebx + 0x1049c]
push eax
mov ecx, esi
mov dword [esi + 8], eax
call fcn.10046168
cmp dword [ebp - 0x1c], 0
jne 0x1001b596
mov ecx, dword [ebp + 0x14]
test ecx, ecx
je 0x1001b49b
cmp dword [ebp - 0x10], 0
je 0x1001b49b
mov eax, dword [edi + 0x48]
cmp ecx, eax
mov dword [ebp - 4], eax
jb 0x1001b49b
mov edx, dword [edi + 0x50]
lea eax, [eax + edx*2]
cmp ecx, eax
jae 0x1001b49b
and dword [ebp - 0x10], 0
cmp dword [ebp - 4], ecx
ja 0x1001b486
lea eax, [ebp - 4]
push eax
mov ecx, edi
call fcn.10010292
mov ecx, dword [ebp - 4]
mov ax, word [edi + 0x4e]
cmp ax, word [ecx]
jne 0x1001b470
inc ecx
inc ecx
mov dword [ebp - 4], ecx
mov ax, word [edi + 0x54]
cmp ax, word [ecx]
jne 0x1001b47e
inc ecx
inc ecx
mov dword [ebp - 4], ecx
inc dword [ebp - 0x10]
cmp ecx, dword [ebp + 0x14]
jbe 0x1001b454
push dword [ebp - 0x10]
lea eax, [ebp - 0x44]
push str._ld_t
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
cmp dword [ebp - 0x18], 0
je 0x1001b55a
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov edi, dword [0x100e2d44]
mov ebx, dword [0x100e2d40]
push edi
push ebx
push dword [ebp - 0x10]
push dword [ebp - 0x14]
call fcn.100b4650
push edi
push ebx
push 0
push eax
mov dword [ebp - 0x18], eax
call fcn.100b4200
mov ecx, dword [ebp - 0x14]
sub ecx, eax
mov eax, dword [ebp - 0x10]
push 0
push 0xf4240
sbb eax, edx
push eax
push ecx
call fcn.100b4200
push edi
push ebx
push edx
push eax
mov dword [ebp - 8], eax
mov dword [ebp - 4], edx
call fcn.100b4650
push edi
push ebx
push 0
push eax
mov dword [ebp + 0x14], eax
call fcn.100b4200
mov ecx, dword [ebp - 8]
sub ecx, eax
mov eax, dword [ebp - 4]
push 0
push 0xf4240
sbb eax, edx
push eax
push ecx
call fcn.100b4200
push edi
push ebx
push edx
push eax
call fcn.100b4650
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edx, dword [esi]
mov ecx, dword [esi + 4]
lea ecx, [edx + ecx*2]
lea edx, [ebp - 0x44]
push edx
push edi
push dword [ebp + 0x14]
push dword [ebp - 0x18]
push eax
push str._lu_t_u._06lu_06lu_t_s
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
mov ebx, dword [ebp - 0x24]
add esp, 0x1c
jmp 0x1001b575
mov ecx, dword [esi]
mov eax, dword [esi + 4]
lea eax, [ecx + eax*2]
lea ecx, [ebp - 0x44]
push ecx
push 0x100ca750
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
mov edx, dword [esi]
inc eax
add dword [esi + 4], eax
cmp dword [ebp - 0x20], 0
mov eax, dword [esi + 4]
sete cl
dec cl
and cl, 0x20
add cl, 0x5b
movsx cx, cl
mov word [edx + eax*2 - 2], cx
mov eax, dword [esi + 4]
mov ecx, dword [esi]
push ebx
push dword [ebp + 8]
lea eax, [ecx + eax*2]
push eax
call fcn.10005b3b
add dword [esi + 4], ebx
mov eax, dword [esi + 4]
xor ecx, ecx
add esp, 0xc
cmp dword [ebp - 0x1c], ecx
jne 0x1001b5d6
cmp dword [ebp - 0x20], ecx
mov edi, dword [esi]
lea edx, [eax + 1]
mov dword [esi + 4], edx
sete dl
dec dl
and dl, 0x20
add dl, 0x5d
movsx dx, dl
mov word [edi + eax*2], dx
cmp byte [ebp + 0x10], 0
mov eax, dword [esi + 4]
mov edx, dword [esi]
mov word [edx + eax*2], cx
mov eax, dword [esi + 4]
jne 0x1001b64b
push dword [ebp + 0xc]
mov ecx, dword [esi]
lea ebx, [ecx + eax*2]
push str._t__lu__t:
push ebx
mov edi, ebx
call dword [sym.imp.USER32.dll_wsprintfW]
xor ecx, ecx
add esp, 0xc
cmp eax, ecx
jle 0x1001b60a
lea edi, [ebx + eax*2]
push ecx
push 0x400
push edi
push ecx
push dword [ebp + 0xc]
push ecx
push 0x1200
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
test eax, eax
jle 0x1001b62a
lea edi, [edi + eax*2]
jmp 0x1001b638
mov word [edi], 0xd
inc edi
inc edi
mov word [edi], 0xa
inc edi
inc edi
mov ecx, dword [esi]
sub edi, ebx
sar edi, 1
add dword [esi + 4], edi
mov eax, dword [esi + 4]
and word [ecx + eax*2], 0
jmp 0x1001b673
lea edx, [eax + 1]
mov dword [esi + 4], edx
mov edx, dword [esi]
mov word [edx + eax*2], 0xd
mov eax, dword [esi + 4]
lea edx, [eax + 1]
mov dword [esi + 4], edx
mov edx, dword [esi]
mov word [edx + eax*2], 0xa
mov eax, dword [esi + 4]
mov edx, dword [esi]
mov word [edx + eax*2], cx
cmp dword [esi + 4], 0x10000
pop edi
pop esi
pop ebx
jg 0x1001b688
mov eax, dword [ebp - 0xc]
cmp byte [eax + 0x19], 0
je 0x1001b694
push dword [ebp + 0x18]
push 1
call fcn.10010a1c
pop ecx
pop ecx
push 0x100e3d7c
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
leave
ret 0x14