Function at 0x4a63a0
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 0x24
mov eax, dword [0x527af4]
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 0x4a63cc
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 + 0x51e3c4]
mov ecx, dword [esp + 0x4c]
mov dword [esp + 0x28], eax
xor eax, eax
mov ax, word [edx*2 + 0x51e3c4]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x30], eax
xor eax, eax
mov ax, word [ecx*2 + 0x51e3c4]
mov dword [esp + 0x20], 1
mov dword [esp + 0x2c], eax
mov eax, dword [edi + 0xab6]
cmp eax, ebx
mov dword [esp + 0x1c], eax
jle 0x4a6908
cmp dword [edi], 0
jne 0x4a6908
cmp ebp, 1
jae 0x4a6453
lea esi, [edi + 0x9088]
push edi
push esi
call fcn.004a3ba0
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 0x4a6436
test bl, 1
je 0x4a6588
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 0x4a6488
mov eax, dword [edi + 0x48]
test eax, eax
je 0x4a6488
mov eax, dword [edi + 0x8cea]
test eax, eax
ja 0x4a6488
mov dword [esp + 0x1c], 0
cmp ebp, dword [esp + 0x44]
jae 0x4a64b4
lea esi, [edi + 0x9088]
push edi
push esi
call fcn.004a3ba0
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 0x4a6494
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 0x4a6548
cmp esi, 0x63
je 0x4a6927
xor ecx, ecx
sub esi, 0x10
mov cl, byte [edx + 1]
sub ebp, ecx
shr ebx, cl
cmp ebp, esi
jae 0x4a651d
lea eax, [edi + 0x9088]
push edi
push eax
call fcn.004a3ba0
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 0x4a64f1
mov edx, dword [esp + 0x18]
xor eax, eax
mov ecx, ebx
mov ax, word [esi*2 + 0x51e3c4]
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 0x4a64d8
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 0x4a68fc
push edi
push eax
call fcn.004a4fc0
add esp, 8
xor eax, eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x14], eax
jmp 0x4a68fc
shr ebx, 1
dec ebp
cmp ebp, 6
jae 0x4a65b3
lea esi, [edi + 0x9088]
push edi
push esi
call fcn.004a3ba0
xor edx, edx
mov ecx, ebp
mov dx, word [esi]
add ebp, 8
shl edx, cl
add esp, 8
or ebx, edx
cmp ebp, 6
jb 0x4a6596
mov eax, ebx
sub ebp, 6
and eax, 0x3f
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x4c]
shr ebx, 6
cmp ebp, eax
jae 0x4a65f0
lea esi, [edi + 0x9088]
push edi
push esi
call fcn.004a3ba0
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 0x4a65d0
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 0x4a6684
cmp esi, 0x63
je 0x4a6927
xor ecx, ecx
sub esi, 0x10
mov cl, byte [edx + 1]
sub ebp, ecx
shr ebx, cl
cmp ebp, esi
jae 0x4a6659
lea eax, [edi + 0x9088]
push edi
push eax
call fcn.004a3ba0
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 0x4a662d
mov edx, dword [esp + 0x18]
xor eax, eax
mov ecx, ebx
mov ax, word [esi*2 + 0x51e3c4]
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 0x4a6614
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 0x4a66d7
lea esi, [edi + 0x9088]
push edi
push esi
call fcn.004a3ba0
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 0x4a66b3
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 0x4a676d
cmp esi, 0x63
je 0x4a6927
xor ecx, ecx
sub esi, 0x10
mov cl, byte [edx + 1]
sub ebp, ecx
shr ebx, cl
cmp ebp, esi
jae 0x4a673d
lea eax, [edi + 0x9088]
push edi
push eax
call fcn.004a3ba0
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 0x4a6713
mov edx, dword [esp + 0x18]
xor ecx, ecx
mov edx, dword [edx + 2]
mov cx, word [esi*2 + 0x51e3c4]
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 0x4a66fa
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 0x4a67cc
cmp ebp, 8
jae 0x4a67b8
lea esi, [edi + 0x9088]
push edi
push esi
call fcn.004a3ba0
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 0x4a6793
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 0x4a67f6
mov ecx, dword [edi + 0x48]
test ecx, ecx
je 0x4a67f6
mov ecx, dword [edi + 0x8cea]
test ecx, ecx
ja 0x4a67f6
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 0x4a680b
mov ecx, esi
mov edx, 0x8000
sub edx, ecx
mov ecx, dword [esp + 0x18]
cmp edx, ecx
jbe 0x4a681c
mov edx, ecx
sub ecx, edx
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x20]
test ecx, ecx
je 0x4a6863
cmp esi, eax
ja 0x4a6863
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 0x4a68d0
mov ecx, dword [esp + 0x10]
mov eax, esi
sub eax, ecx
cmp eax, edx
jb 0x4a68b1
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 0x4a68d0
mov eax, dword [esp + 0x10]
mov cl, byte [edi + eax + 0xcd6]
mov byte [edi + esi + 0xcd6], cl
inc esi
inc eax
dec edx
jne 0x4a68b5
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], esi
cmp esi, 0x8000
jne 0x4a68f0
push edi
push esi
call fcn.004a4fc0
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 0x4a67f6
mov eax, dword [esp + 0x1c]
test eax, eax
jg 0x4a6422
mov edx, dword [esp + 0x14]
push edi
push edx
call fcn.004a4fc0
mov eax, dword [edi + 0x44]
add esp, 8
test eax, eax
je 0x4a6934
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