Function at 0x496260
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 0x240
push ebp
push esi
mov esi, dword [esp + 0x250]
mov ebp, ecx
test esi, esi
jne 0x49627c
call fcn.00494e70
mov esi, eax
cmp esi, 5
jne 0x4962ac
mov ecx, ebp
call fcn.00494dd0
mov ecx, dword [ebp + 0x38]
push dword [ecx + eax*4]
mov ecx, dword [esp + 0x250]
call fcn.004845b0
mov eax, dword [esp + 0x24c]
pop esi
pop ebp
add esp, 0x240
ret 0xc
cmp esi, 6
jne 0x4962d1
mov ecx, dword [esp + 0x24c]
push 0
call fcn.004845b0
mov eax, dword [esp + 0x24c]
pop esi
pop ebp
add esp, 0x240
ret 0xc
mov eax, dword [esp + 0x254]
test eax, eax
jne 0x4962e9
mov ecx, ebp
call fcn.00494dd0
mov ecx, dword [ebp + 0x1c]
mov eax, dword [ecx + eax*4]
push ebx
push edi
push eax
lea ecx, [esp + 0x1c]
call fcn.00484dc0
lea ecx, [esp + 0x18]
call fcn.00484ed0
mov ecx, dword [ebp + 0x14]
mov ebx, eax
lea eax, [esp + 0x18]
push eax
mov edx, dword [ecx]
call dword [edx + 0x10]
push eax
lea ecx, [esp + 0x14]
call fcn.004845b0
mov edi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esi, 3
je 0x496412
sub esi, 1
je 0x496380
push 0x200
lea eax, [esp + 0x54]
push eax
lea ecx, [esp + 0x4c]
call fcn.004745a0
push str.corrupt_file
lea ecx, [esp + 0x48]
call fcn.0045cb80
mov ecx, dword [0x884c54]
lea edx, [esp + 0x50]
push 0x1bd
push str.TagfileBinaryhkBinaryTagfileReader.cpp
push edx
mov eax, dword [ecx]
push 0x484994d5
push 3
call dword [eax + 0xc]
test eax, eax
je 0x496372
int3
lea ecx, [esp + 0x44]
call fcn.0045caa0
jmp 0x496412
mov eax, dword [ebp + 0x3c]
lea esi, [ebp + 0x38]
mov edi, dword [esp + 0x10]
mov dword [esp + 0x14], eax
mov eax, dword [esi + 8]
and eax, 0x3fffffff
cmp dword [esi + 4], eax
jne 0x4963ab
push 4
push esi
push 0x7d8954
call fcn.00467c00
add esp, 0xc
mov ecx, dword [esi + 4]
mov eax, dword [esi]
push dword [esp + 0x14]
mov dword [eax + ecx*4], edi
lea ecx, [ebp + 0x44]
inc dword [esi + 4]
call fcn.0046b460
mov dword [esp + 0x14], eax
cmp eax, dword [ebp + 0x4c]
jg 0x49640c
mov ecx, dword [ebp + 0x44]
mov esi, dword [ecx + eax*8 + 4]
lea eax, [esp + 0x10]
push eax
mov ecx, esi
call fcn.00495d20
test esi, esi
je 0x496400
mov ecx, esi
call fcn.004953b0
push dword [0x884adc]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push 0x18
push esi
mov ecx, dword [eax + 0x2c]
mov eax, dword [ecx]
call dword [eax + 8]
push dword [esp + 0x14]
lea ecx, [ebp + 0x44]
call fcn.0046bcc0
mov edi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
push dword [0x884adc]
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x3c], connect
mov dword [esp + 0x44], 0x80
call edi
cmp dword [eax + 8], 0x80
mov ecx, dword [eax + 0xc]
lea edx, [ecx + 0x80]
jl 0x496456
cmp edx, dword [eax + 0x10]
ja 0x496456
mov dword [eax + 0xc], edx
jmp 0x496464
push 0x80
mov ecx, eax
call fcn.0046a3c0
mov ecx, eax
lea eax, [esp + 0x30]
mov dword [esp + 0x30], ecx
push eax
mov dword [esp + 0x40], ecx
mov ecx, ebp
push ebx
mov dword [esp + 0x40], 0x80000080
call fcn.00495f90
xor esi, esi
mov dword [esp + 0x1c], 0
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], connect
mov dword [esp + 0x2c], ebx
test ebx, ebx
je 0x4964dd
push dword [0x884adc]
call edi
lea ecx, [ebx + ebx*2]
lea edx, [ecx*8 + 0x7f]
and edx, 0xffffff80
mov ecx, dword [eax + 0xc]
lea esi, [ecx + edx]
cmp edx, dword [eax + 8]
jg 0x4964cd
cmp esi, dword [eax + 0x10]
ja 0x4964cd
mov dword [eax + 0xc], esi
mov esi, dword [esp + 0x20]
jmp 0x4964df
push edx
mov ecx, eax
call fcn.0046a3c0
mov esi, dword [esp + 0x20]
mov ecx, eax
jmp 0x4964df
xor ecx, ecx
mov eax, ebx
mov dword [esp + 0x1c], ecx
or eax, 0x80000000
mov dword [esp + 0x28], ecx
mov edx, ebx
mov dword [esp + 0x24], eax
sub edx, esi
lea eax, [esi + esi*2]
test edx, edx
jle 0x49653b
lea ecx, [ecx + eax*8]
add ecx, 8
lea eax, [ecx - 8]
test eax, eax
je 0x496533
mov dword [ecx - 8], 0
mov dword [ecx - 4], 0
mov dword [ecx], 0
mov dword [ecx + 4], 0
mov dword [ecx + 8], 0
mov dword [ecx + 0xc], 0
add ecx, 0x18
sub edx, 1
jne 0x496503
lea eax, [esp + 0x1c]
mov dword [esp + 0x20], ebx
push eax
lea ecx, [esp + 0x1c]
call fcn.00484f00
xor esi, esi
test ebx, ebx
jle 0x496591
xor edi, edi
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x1c]
add ecx, edi
mov dword [esp + 0x14], ecx
cmp byte [eax + esi], 0
je 0x496589
push dword [ecx]
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x18]
call fcn.00484920
push dword [esp + 0x14]
mov ecx, ebp
push dword [eax + 4]
push dword [eax]
call fcn.00495d60
inc esi
add edi, 0x18
cmp esi, ebx
jl 0x496555
mov ebx, dword [esp + 0x254]
lea eax, [esp + 0x10]
push eax
mov ecx, ebx
call fcn.004845d0
mov edi, dword [esp + 0x28]
xor ecx, ecx
mov eax, dword [esp + 0x20]
cmp edi, dword [esp + 0x1c]
push dword [0x884adc]
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmove eax, ecx
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x30]
lea eax, [eax + eax*2]
lea esi, [eax*8 + 0x7f]
and esi, 0xffffff80
call ebp
lea edx, [esi + 0xf]
and edx, 0xfffffff0
cmp esi, dword [eax + 8]
jg 0x4965f5
lea ecx, [edx + edi]
cmp ecx, dword [eax + 0xc]
jne 0x4965f5
cmp dword [eax + 0x14], edi
je 0x4965f5
mov dword [eax + 0xc], edi
jmp 0x4965fe
push edx
push edi
mov ecx, eax
call fcn.0046a590
mov eax, dword [esp + 0x24]
mov dword [esp + 0x20], 0
test eax, eax
js 0x49662b
and eax, 0x3fffffff
mov ecx, 0x7d8954
lea eax, [eax + eax*2]
shl eax, 3
push eax
mov eax, dword [0x7d8954]
push dword [esp + 0x20]
call dword [eax + 0x10]
mov edi, dword [esp + 0x3c]
xor ecx, ecx
mov eax, dword [esp + 0x34]
cmp edi, dword [esp + 0x30]
mov esi, dword [esp + 0x40]
push dword [0x884adc]
cmove eax, ecx
mov dword [esp + 0x20], 0
add esi, 0x7f
mov dword [esp + 0x28], connect
mov dword [esp + 0x38], eax
and esi, 0xffffff80
call ebp
lea edx, [esi + 0xf]
and edx, 0xfffffff0
cmp esi, dword [eax + 8]
jg 0x49667f
lea ecx, [edx + edi]
cmp ecx, dword [eax + 0xc]
jne 0x49667f
cmp dword [eax + 0x14], edi
je 0x49667f
mov dword [eax + 0xc], edi
jmp 0x496688
push edx
push edi
mov ecx, eax
call fcn.0046a590
mov eax, dword [esp + 0x38]
mov dword [esp + 0x34], 0
test eax, eax
js 0x4966af
and eax, 0x3fffffff
mov ecx, 0x7d8954
push eax
mov eax, dword [0x7d8954]
push dword [esp + 0x34]
call dword [eax + 0x10]
lea ecx, [esp + 0x10]
mov dword [esp + 0x30], 0
mov dword [esp + 0x38], connect
call fcn.00484690
lea ecx, [esp + 0x18]
call fcn.00484dd0
pop edi
mov eax, ebx
pop ebx
pop esi
pop ebp
add esp, 0x240
ret 0xc