Function at 0x4a4730
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 0x24
mov eax, dword [0x526ad4]
push ebx
push ebp
push esi
push edi
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov edi, eax
xor ebx, ebx
cmp edi, ebx
mov dword [esp + 0x24], edi
jne 0x4a475c
pop edi
pop esi
pop ebp
mov eax, 5
pop ebx
add esp, 0x24
ret
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x48]
xor eax, eax
xor ebp, ebp
mov ax, word [ecx*2 + 0x51d3a4]
mov ecx, dword [esp + 0x4c]
mov dword [esp + 0x28], eax
xor eax, eax
mov ax, word [edx*2 + 0x51d3a4]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x30], eax
xor eax, eax
mov ax, word [ecx*2 + 0x51d3a4]
mov dword [esp + 0x20], 1
mov dword [esp + 0x2c], eax
mov eax, dword [edi + 0xab6]
cmp eax, ebx
mov dword [esp + 0x1c], eax
jle 0x4a4c98
cmp dword [edi], 0
jne 0x4a4c98
cmp ebp, 1
jae 0x4a47e3
lea esi, [edi + 0x9088]
push edi
push esi
call fcn.004a24e0
xor edx, edx
mov ecx, ebp
mov dx, word [esi]
add ebp, 8
shl edx, cl
add esp, 8
or ebx, edx
cmp ebp, 1
jb 0x4a47c6
test bl, 1
je 0x4a4918
mov ecx, dword [esp + 0x1c]
mov eax, dword [edi + 0x44]
shr ebx, 1
dec ebp
dec ecx
test eax, eax
mov dword [esp + 0x1c], ecx
je 0x4a4818
mov eax, dword [edi + 0x48]
test eax, eax
je 0x4a4818
mov eax, dword [edi + 0x8cea]
test eax, eax
ja 0x4a4818
mov dword [esp + 0x1c], 0
cmp ebp, dword [esp + 0x44]
jae 0x4a4844
lea esi, [edi + 0x9088]
push edi
push esi
call fcn.004a24e0
xor eax, eax
mov ecx, ebp
mov ax, word [esi]
add ebp, 8
shl eax, cl
add esp, 8
or ebx, eax
mov eax, dword [esp + 0x44]
cmp ebp, eax
jb 0x4a4824
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x38]
mov eax, ebx
not eax
and eax, ecx
lea ecx, [eax + eax*2]
xor eax, eax
mov al, byte [edx + ecx*2]
lea edx, [edx + ecx*2]
mov esi, eax
cmp esi, 0x10
mov dword [esp + 0x18], edx
jbe 0x4a48d8
cmp esi, 0x63
je 0x4a4cb7
xor ecx, ecx
sub esi, 0x10
mov cl, byte [edx + 1]
sub ebp, ecx
shr ebx, cl
cmp ebp, esi
jae 0x4a48ad
lea eax, [edi + 0x9088]
push edi
push eax
call fcn.004a24e0
xor ecx, ecx
add esp, 8
mov cx, word [edi + 0x9088]
mov edx, ecx
mov ecx, ebp
shl edx, cl
add ebp, 8
or ebx, edx
cmp ebp, esi
jb 0x4a4881
mov edx, dword [esp + 0x18]
xor eax, eax
mov ecx, ebx
mov ax, word [esi*2 + 0x51d3a4]
not ecx
and eax, ecx
mov ecx, dword [edx + 2]
xor edx, edx
lea eax, [eax + eax*2]
mov dl, byte [ecx + eax*2]
lea eax, [ecx + eax*2]
mov esi, edx
mov dword [esp + 0x18], eax
cmp esi, 0x10
mov edx, eax
ja 0x4a4868
mov eax, dword [esp + 0x14]
xor ecx, ecx
mov cl, byte [edx + 1]
shr ebx, cl
sub ebp, ecx
mov cl, byte [edx + 2]
mov byte [eax + edi + 0xcd6], cl
inc eax
cmp eax, 0x8000
mov dword [esp + 0x14], eax
jne 0x4a4c8c
push edi
push eax
call fcn.004a3900
add esp, 8
xor eax, eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x14], eax
jmp 0x4a4c8c
shr ebx, 1
dec ebp
cmp ebp, 7
jae 0x4a4943
lea esi, [edi + 0x9088]
push edi
push esi
call fcn.004a24e0
xor edx, edx
mov ecx, ebp
mov dx, word [esi]
add ebp, 8
shl edx, cl
add esp, 8
or ebx, edx
cmp ebp, 7
jb 0x4a4926
mov eax, ebx
sub ebp, 7
and eax, 0x7f
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x4c]
shr ebx, 7
cmp ebp, eax
jae 0x4a4980
lea esi, [edi + 0x9088]
push edi
push esi
call fcn.004a24e0
xor eax, eax
mov ecx, ebp
mov ax, word [esi]
add ebp, 8
shl eax, cl
add esp, 8
or ebx, eax
mov eax, dword [esp + 0x4c]
cmp ebp, eax
jb 0x4a4960
mov edx, dword [esp + 0x2c]
mov ecx, ebx
not ecx
and ecx, edx
mov edx, dword [esp + 0x40]
xor eax, eax
lea ecx, [ecx + ecx*2]
mov al, byte [edx + ecx*2]
lea edx, [edx + ecx*2]
mov esi, eax
mov dword [esp + 0x18], edx
cmp esi, 0x10
jbe 0x4a4a14
cmp esi, 0x63
je 0x4a4cb7
xor ecx, ecx
sub esi, 0x10
mov cl, byte [edx + 1]
sub ebp, ecx
shr ebx, cl
cmp ebp, esi
jae 0x4a49e9
lea eax, [edi + 0x9088]
push edi
push eax
call fcn.004a24e0
xor ecx, ecx
add esp, 8
mov cx, word [edi + 0x9088]
mov edx, ecx
mov ecx, ebp
shl edx, cl
add ebp, 8
or ebx, edx
cmp ebp, esi
jb 0x4a49bd
mov edx, dword [esp + 0x18]
xor eax, eax
mov ecx, ebx
mov ax, word [esi*2 + 0x51d3a4]
not ecx
and eax, ecx
mov ecx, dword [edx + 2]
xor edx, edx
lea eax, [eax + eax*2]
mov dl, byte [ecx + eax*2]
lea eax, [ecx + eax*2]
mov esi, edx
mov dword [esp + 0x18], eax
cmp esi, 0x10
mov edx, eax
ja 0x4a49a4
xor ecx, ecx
xor eax, eax
mov cl, byte [edx + 1]
mov ax, word [edx + 2]
mov edx, dword [esp + 0x10]
sub ebp, ecx
shr ebx, cl
mov ecx, eax
mov eax, dword [esp + 0x14]
sub eax, ecx
mov ecx, dword [esp + 0x48]
sub eax, edx
cmp ebp, ecx
mov dword [esp + 0x10], eax
jae 0x4a4a67
lea esi, [edi + 0x9088]
push edi
push esi
call fcn.004a24e0
xor edx, edx
mov eax, dword [esp + 0x50]
mov dx, word [esi]
mov ecx, ebp
shl edx, cl
add ebp, 8
add esp, 8
or ebx, edx
cmp ebp, eax
jb 0x4a4a43
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x30]
mov ecx, ebx
not ecx
and ecx, edx
mov edx, dword [esp + 0x3c]
lea ecx, [ecx + ecx*2]
lea edx, [edx + ecx*2]
xor ecx, ecx
mov dword [esp + 0x18], edx
mov cl, byte [edx]
mov esi, ecx
cmp esi, 0x10
jbe 0x4a4afd
cmp esi, 0x63
je 0x4a4cb7
xor ecx, ecx
sub esi, 0x10
mov cl, byte [edx + 1]
sub ebp, ecx
shr ebx, cl
cmp ebp, esi
jae 0x4a4acd
lea eax, [edi + 0x9088]
push edi
push eax
call fcn.004a24e0
xor edx, edx
mov ecx, ebp
mov dx, word [edi + 0x9088]
add ebp, 8
shl edx, cl
add esp, 8
or ebx, edx
cmp ebp, esi
jb 0x4a4aa3
mov edx, dword [esp + 0x18]
xor ecx, ecx
mov edx, dword [edx + 2]
mov cx, word [esi*2 + 0x51d3a4]
mov esi, ebx
not esi
and ecx, esi
mov eax, dword [esp + 0x10]
lea ecx, [ecx + ecx*2]
lea esi, [edx + ecx*2]
xor ecx, ecx
mov dword [esp + 0x18], esi
mov cl, byte [esi]
mov edx, dword [esp + 0x18]
mov esi, ecx
cmp esi, 0x10
ja 0x4a4a8a
xor ecx, ecx
mov cl, byte [edx + 1]
mov dword [esp + 0x18], ecx
sub ebp, ecx
shr ebx, cl
xor ecx, ecx
mov cx, word [edx + 2]
test esi, esi
mov dword [esp + 0x18], ecx
je 0x4a4b5c
cmp ebp, 8
jae 0x4a4b48
lea esi, [edi + 0x9088]
push edi
push esi
call fcn.004a24e0
xor edx, edx
mov ecx, ebp
mov dx, word [esi]
add ebp, 8
shl edx, cl
add esp, 8
or ebx, edx
cmp ebp, 8
jb 0x4a4b23
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
mov edx, ebx
and edx, 0xff
add ecx, edx
shr ebx, 8
mov dword [esp + 0x18], ecx
sub ebp, 8
mov edx, dword [esp + 0x1c]
sub edx, ecx
mov ecx, dword [edi + 0x44]
test ecx, ecx
mov dword [esp + 0x1c], edx
je 0x4a4b86
mov ecx, dword [edi + 0x48]
test ecx, ecx
je 0x4a4b86
mov ecx, dword [edi + 0x8cea]
test ecx, ecx
ja 0x4a4b86
mov dword [esp + 0x1c], 0
mov esi, dword [esp + 0x14]
and eax, 0x7fff
cmp eax, esi
mov dword [esp + 0x10], eax
mov ecx, eax
ja 0x4a4b9b
mov ecx, esi
mov edx, 0x8000
sub edx, ecx
mov ecx, dword [esp + 0x18]
cmp edx, ecx
jbe 0x4a4bac
mov edx, ecx
sub ecx, edx
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x20]
test ecx, ecx
je 0x4a4bf3
cmp esi, eax
ja 0x4a4bf3
mov ecx, edx
lea edi, [esi + edi + 0xcd6]
mov esi, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, esi
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
mov edi, dword [esp + 0x24]
add ecx, edx
add eax, edx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], eax
mov esi, ecx
jmp 0x4a4c60
mov ecx, dword [esp + 0x10]
mov eax, esi
sub eax, ecx
cmp eax, edx
jb 0x4a4c41
mov eax, dword [esp + 0x10]
mov ecx, edx
lea esi, [edi + eax + 0xcd6]
mov eax, dword [esp + 0x14]
lea edi, [edi + eax + 0xcd6]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0x10]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x14]
mov edi, dword [esp + 0x24]
add ecx, edx
add eax, edx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], eax
mov esi, ecx
jmp 0x4a4c60
mov eax, dword [esp + 0x10]
mov cl, byte [edi + eax + 0xcd6]
mov byte [edi + esi + 0xcd6], cl
inc esi
inc eax
dec edx
jne 0x4a4c45
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], esi
cmp esi, 0x8000
jne 0x4a4c80
push edi
push esi
call fcn.004a3900
add esp, 8
xor eax, eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
test ecx, ecx
jne 0x4a4b86
mov eax, dword [esp + 0x1c]
test eax, eax
jg 0x4a47b2
mov edx, dword [esp + 0x14]
push edi
push edx
call fcn.004a3900
mov eax, dword [edi + 0x44]
add esp, 8
test eax, eax
je 0x4a4cc4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x24
ret
mov eax, dword [edi + 0xab2]
pop edi
neg eax
sbb eax, eax
pop esi
pop ebp
and eax, 5
pop ebx
add esp, 0x24
ret