Function at 0x1004e1a0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
push ebx
push esi
push edi
push dword [0x100c7608]
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x10], 0
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
mov dword [ebp - 0xc], ebx
test ebx, ebx
je 0x1004e575
mov eax, dword [ebp + 8]
mov ecx, dword [ebx + 0x1b420]
mov edi, dword [ebx + 0x1b428]
mov esi, dword [ebx + 0x1b42c]
movzx edx, word [eax*2 + 0x100b0540]
mov dword [ebp - 0x1c], edx
mov edx, dword [ebp + 0xc]
mov dword [ebp - 4], ecx
movzx edx, word [edx*2 + 0x100b0540]
mov dword [ebp - 0x24], edx
cmp dword [ebx + 4], 0
jne 0x1004e543
cmp esi, eax
jae 0x1004e238
lea eax, [ebx + 0x1b430]
mov edx, ebx
mov ecx, eax
call fcn.1004f8d0
movzx eax, word [ebx + 0x1b430]
mov ecx, esi
shl eax, cl
add esi, 8
or edi, eax
lea eax, [ebx + 0x1b430]
cmp esi, dword [ebp + 8]
jb 0x1004e214
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x20]
and eax, edi
movzx edx, byte [ecx + eax*8]
lea eax, [ecx + eax*8]
mov dword [ebp - 0x14], eax
mov dword [ebp - 8], edx
cmp edx, 0x12
jbe 0x1004e2bb
cmp edx, 0x63
je 0x1004e575
movzx ecx, byte [eax + 1]
sub edx, 0x12
sub esi, ecx
shr edi, cl
mov dword [ebp - 8], edx
cmp esi, edx
jae 0x1004e29c
lea eax, [ebx + 0x1b430]
mov edx, ebx
mov ecx, eax
call fcn.1004f8d0
movzx eax, word [ebx + 0x1b430]
mov ecx, esi
mov edx, dword [ebp - 8]
add esi, 8
shl eax, cl
or edi, eax
lea eax, [ebx + 0x1b430]
cmp esi, edx
jb 0x1004e273
mov eax, dword [ebp - 0x14]
movzx ecx, word [edx*2 + 0x100b0540]
mov eax, dword [eax + 4]
and ecx, edi
movzx edx, byte [eax + ecx*8]
lea eax, [eax + ecx*8]
mov dword [ebp - 0x14], eax
mov dword [ebp - 8], edx
cmp edx, 0x12
ja 0x1004e252
movzx ecx, byte [eax + 1]
shr edi, cl
sub esi, ecx
cmp edx, 0x12
jne 0x1004e301
mov ecx, dword [ebp - 4]
mov al, byte [eax + 4]
mov byte [ecx + ebx + 0x8344], al
inc ecx
mov dword [ebp - 4], ecx
cmp ecx, 0x10000
jne 0x1004e51c
mov edx, ebx
call fcn.1004e110
mov ecx, eax
mov dword [ebp - 0x10], ecx
test ecx, ecx
jne 0x1004e56c
mov dword [ebp - 4], ecx
jmp 0x1004e51c
cmp edx, 0x11
je 0x1004e540
cmp esi, edx
jae 0x1004e33d
lea eax, [ebx + 0x1b430]
mov edx, ebx
mov ecx, eax
call fcn.1004f8d0
movzx eax, word [ebx + 0x1b430]
mov ecx, esi
mov edx, dword [ebp - 8]
add esi, 8
shl eax, cl
or edi, eax
lea eax, [ebx + 0x1b430]
cmp esi, edx
jb 0x1004e314
mov eax, dword [ebp - 0x14]
movzx ecx, word [edx*2 + 0x100b0540]
sub esi, edx
movzx eax, word [eax + 4]
and ecx, edi
add ecx, eax
mov dword [ebp - 0x18], ecx
mov ecx, edx
shr edi, cl
cmp esi, dword [ebp + 0xc]
jae 0x1004e385
lea eax, [ebx + 0x1b430]
mov edx, ebx
mov ecx, eax
call fcn.1004f8d0
movzx eax, word [ebx + 0x1b430]
mov ecx, esi
shl eax, cl
add esi, 8
or edi, eax
lea eax, [ebx + 0x1b430]
cmp esi, dword [ebp + 0xc]
jb 0x1004e361
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x28]
and eax, edi
lea ecx, [ecx + eax*8]
movzx eax, byte [ecx]
mov dword [ebp - 0x14], ecx
mov dword [ebp - 8], eax
cmp eax, 0x12
jbe 0x1004e406
mov edi, edi
cmp eax, 0x63
je 0x1004e575
movzx ecx, byte [ecx + 1]
sub eax, 0x12
sub esi, ecx
shr edi, cl
mov dword [ebp - 8], eax
cmp esi, eax
jae 0x1004e3e5
lea ecx, [ebx + 0x1b430]
mov edx, ebx
call fcn.1004f8d0
movzx eax, word [ebx + 0x1b430]
mov ecx, esi
shl eax, cl
add esi, 8
or edi, eax
lea ecx, [ebx + 0x1b430]
mov eax, dword [ebp - 8]
cmp esi, eax
jb 0x1004e3c1
movzx ecx, word [eax*2 + 0x100b0540]
mov eax, dword [ebp - 0x14]
and ecx, edi
mov eax, dword [eax + 4]
lea ecx, [eax + ecx*8]
movzx eax, byte [ecx]
mov dword [ebp - 0x14], ecx
mov dword [ebp - 8], eax
cmp eax, 0x12
ja 0x1004e3a0
movzx ecx, byte [ecx + 1]
sub esi, ecx
shr edi, cl
cmp esi, eax
jae 0x1004e43c
lea ecx, [ebx + 0x1b430]
mov edx, ebx
call fcn.1004f8d0
movzx eax, word [ebx + 0x1b430]
mov ecx, esi
shl eax, cl
add esi, 8
or edi, eax
lea ecx, [ebx + 0x1b430]
mov eax, dword [ebp - 8]
cmp esi, eax
jb 0x1004e418
movzx eax, word [eax*2 + 0x100b0540]
mov edx, dword [ebp - 4]
and eax, edi
mov ecx, dword [ebp - 8]
sub edx, eax
mov eax, dword [ebp - 0x14]
shr edi, cl
mov dword [ebp - 0x30], edi
movzx eax, word [eax + 4]
sub edx, eax
sub esi, ecx
mov ecx, dword [ebp - 4]
mov dword [ebp - 0x2c], esi
movzx edx, dx
mov dword [ebp - 8], edx
mov eax, edx
cmp edx, ecx
ja 0x1004e472
mov eax, ecx
mov ebx, 0x10000
sub ebx, eax
mov eax, dword [ebp - 0x18]
cmp ebx, eax
jbe 0x1004e482
mov ebx, eax
sub eax, ebx
mov dword [ebp - 0x18], eax
mov eax, ecx
mov ecx, dword [ebp - 0xc]
sub eax, edx
cmp eax, ebx
lea eax, [ecx + 0x8344]
jb 0x1004e4bb
add eax, edx
push ebx
push eax
lea eax, [ecx + 0x8344]
add eax, dword [ebp - 4]
push eax
call fcn.1007d410
mov ecx, dword [ebp - 4]
add esp, 0xc
add ecx, ebx
add dword [ebp - 8], ebx
mov dword [ebp - 4], ecx
jmp 0x1004e4f1
mov esi, dword [ebp - 4]
lea edi, [ecx + 0x8344]
add eax, esi
add edi, edx
mov dword [ebp - 0x14], eax
mov ecx, eax
lea ecx, [ecx]
mov al, byte [edi]
lea ecx, [ecx + 1]
inc esi
mov byte [ecx - 1], al
inc edx
lea edi, [edi + 1]
sub ebx, 1
jne 0x1004e4d0
mov edi, dword [ebp - 0x30]
mov dword [ebp - 4], esi
mov esi, dword [ebp - 0x2c]
mov ecx, dword [ebp - 4]
mov dword [ebp - 8], edx
mov ebx, dword [ebp - 0xc]
cmp ecx, 0x10000
jne 0x1004e50f
mov edx, ebx
call fcn.1004e110
mov ecx, eax
mov dword [ebp - 0x10], ecx
test ecx, ecx
jne 0x1004e56c
mov dword [ebp - 4], ecx
cmp dword [ebp - 0x18], 0
mov edx, dword [ebp - 8]
jne 0x1004e464
cmp byte [ebx + 0x1837c], 0
je 0x1004e52e
cmp dword [ebx + 0x18370], 0
jbe 0x1004e543
cmp dword [ebx + 0x1b410], 1
mov eax, dword [ebp + 8]
jle 0x1004e200
jmp 0x1004e543
mov ecx, dword [ebp - 4]
cmp dword [ebx + 0x34], 0
mov dword [ebx + 0x1b420], ecx
mov dword [ebx + 0x1b428], edi
mov dword [ebx + 0x1b42c], esi
jne 0x1004e569
cmp byte [ebx + 0x1837c], 0
mov ecx, 1
jne 0x1004e56c
mov ecx, dword [ebp - 0x10]
mov eax, ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret