Function at 0x4e2040
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x8c
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 0x14]
push esi
push edi
mov dword [esp + 0x1c], 0
test eax, eax
je 0x4e2671
cmp dword [eax + 4], 5
jne 0x4e2671
test ebx, ebx
je 0x4e2671
mov esi, dword [eax + 0x14]
push 5
mov eax, esi
mov dword [esp + 0x28], esi
call fcn.0049da60
test al, al
je 0x4e20e8
mov eax, dword [esi]
mov edx, dword [eax + 0x1c]
lea ecx, [esp + 0x24]
push ecx
mov ecx, esi
call edx
test eax, eax
jl 0x4e2633
mov edi, 0x58
call fcn.00450d70
test eax, eax
je 0x4e263a
mov ecx, dword [ebp + 0xc]
push ecx
push 1
push 0
push 0
lea edx, [edi - 0x39]
call fcn.004a9810
mov esi, eax
test esi, esi
je 0x4e263a
mov edx, dword [esp + 0x24]
mov eax, dword [ebp + 0x10]
mov dword [esi + 0x24], eax
mov eax, esi
mov dword [esi + 0x14], edx
call fcn.004e0210
mov dword [ebp + 0x10], esi
mov edi, 0x58
call fcn.00450d70
test eax, eax
je 0x4e2186
mov edi, dword [ebp + 0xc]
push edi
push 1
push 0
push 0
mov edx, 0x1e
call fcn.004a9810
mov esi, eax
mov dword [esp + 0x1c], esi
test esi, esi
je 0x4e263a
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx]
mov edx, dword [edx + 0x20]
lea eax, [esp + 0x3c]
push eax
lea eax, [esp + 0x3c]
push eax
push 1
push 2
push ebx
call edx
test eax, eax
jne 0x4e21b8
mov eax, dword [esp + 0x38]
mov ebx, dword [ebp + 8]
mov eax, dword [eax + 0x48]
mov ecx, dword [esp + 0x24]
push edi
mov edi, ebx
call fcn.004aa970
mov dword [esi + 0x14], eax
test eax, eax
je 0x4e263a
mov edi, 0x50
call fcn.00450d70
test eax, eax
je 0x4e2193
mov ecx, dword [ebx + 0x1b4]
lea edx, [ecx + 1]
push ecx
mov dword [ebx + 0x1b4], edx
mov edx, dword [esp + 0x40]
push 2
call fcn.004a9b10
jmp 0x4e2195
mov dword [esp + 0x1c], 0
jmp 0x4e263a
xor eax, eax
mov dword [esi + 0x28], eax
test eax, eax
je 0x4e263a
mov ecx, dword [ebp + 0x10]
mov eax, esi
mov dword [esi + 0x24], ecx
call fcn.004e0210
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
xor edi, edi
cmp dword [ebp + 0x18], edi
jne case.default.0x4e22d2
mov ecx, dword [esp + 0x24]
mov eax, dword [ecx]
mov eax, dword [eax + 0x28]
lea edx, [esp + 0x40]
push edx
push edi
call eax
test al, al
je case.default.0x4e22d2
mov eax, ebx
mov dword [esp + 0x10], ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4e21e5
sub eax, edx
lea ecx, [eax + ebx]
movsx eax, byte [ebx]
add eax, 0xffffffa1
mov dword [esp + 0x2c], ecx
cmp eax, 0x1b
ja case.default.0x4e22d2
movzx edx, byte [eax + 0x4e268c]
jmp dword [edx*4 + 0x4e267c]
mov eax, dword [esp + 0x40]
cmp eax, 2
je 0x4e2224
cmp eax, 9
jne case.default.0x4e22d2
mov dword [esp + 0x28], edi
jmp 0x4e226d
mov eax, dword [esp + 0x40]
cmp eax, 2
je 0x4e223c
cmp eax, 9
jne case.default.0x4e22d2
mov dword [esp + 0x28], 1
jmp 0x4e226d
cmp dword [esp + 0x40], 8
jne case.default.0x4e22d2
lea eax, [ebx + 1]
cmp eax, ecx
jae 0x4e2265
cmp byte [eax], 0x6d
mov dword [esp + 0x28], 3
je 0x4e226d
mov dword [esp + 0x28], 2
lea eax, [esi + 0x28]
mov dword [esp + 0x20], edi
mov dword [esp + 0x30], eax
cmp ebx, ecx
jae 0x4e24d5
mov esi, dword [esp + 0x34]
lea eax, [ebx + 3]
add ebx, 2
mov dword [esp + 0x14], ebx
mov ebx, dword [esp + 0x34]
mov dword [esp + 0x18], eax
jmp 0x4e22a0
cmp dword [esp + 0x20], 4
jae 0x4e24bc
mov eax, dword [esp + 0x28]
cmp eax, 3
ja case.default.0x4e22b8
jmp dword [eax*4 + 0x4e26a8]
mov ecx, dword [esp + 0x10]
movsx eax, byte [ecx]
add eax, 0xffffff89
cmp eax, 3
ja case.default.0x4e22d2
jmp dword [eax*4 + 0x4e26b8]
xor ebx, ebx
xor esi, esi
lea eax, [ebx + 1]
jmp 0x4e23f3
mov ebx, 2
xor esi, esi
lea eax, [ebx - 1]
jmp 0x4e23f3
mov ebx, 3
xor esi, esi
lea eax, [ebx - 2]
jmp 0x4e23f3
mov edx, dword [esp + 0x10]
movsx eax, byte [edx]
add eax, 0xffffff9f
cmp eax, 0x11
ja case.default.0x4e22d2
movzx eax, byte [eax + 0x4e26dc]
jmp dword [eax*4 + 0x4e26c8]
mov ebx, 1
xor esi, esi
mov eax, ebx
jmp 0x4e23f3
mov ecx, dword [esp + 0x2c]
cmp dword [esp + 0x14], ecx
jae case.default.0x4e22d2
mov edx, dword [esp + 0x10]
cmp byte [edx], 0x5f
jne case.default.0x4e22d2
mov eax, edx
mov cl, byte [eax + 1]
cmp cl, 0x31
jl case.default.0x4e22d2
cmp cl, 0x39
jg case.default.0x4e22d2
mov edx, dword [esp + 0x14]
mov al, byte [edx]
cmp al, 0x31
jl case.default.0x4e22d2
cmp al, 0x39
jg case.default.0x4e22d2
movsx esi, cl
movsx ebx, al
sub esi, 0x31
sub ebx, 0x31
mov eax, 3
jmp 0x4e23f3
mov eax, dword [esp + 0x2c]
cmp dword [esp + 0x18], eax
jae case.default.0x4e22d2
mov ecx, dword [esp + 0x10]
cmp byte [ecx], 0x5f
jne case.default.0x4e22d2
mov edx, ecx
cmp byte [edx + 1], 0x6d
jne case.default.0x4e22d2
mov eax, dword [esp + 0x14]
mov cl, byte [eax]
cmp cl, 0x30
jl case.default.0x4e22d2
cmp cl, 0x39
jg case.default.0x4e22d2
mov edx, dword [esp + 0x18]
mov al, byte [edx]
cmp al, 0x30
jl case.default.0x4e22d2
cmp al, 0x39
jg case.default.0x4e22d2
movsx esi, cl
movsx ebx, al
sub esi, 0x30
sub ebx, 0x30
mov eax, 4
add dword [esp + 0x10], eax
add dword [esp + 0x14], eax
add dword [esp + 0x18], eax
cmp esi, dword [esp + 0x70]
jae case.default.0x4e22d2
mov eax, dword [esp + 0x74]
cmp ebx, eax
jae case.default.0x4e22d2
imul eax, esi
add eax, ebx
mov edi, 0x18
mov dword [esp + 0x34], eax
call fcn.00450d70
test eax, eax
je 0x4e244e
mov ecx, 1
mov dword [eax + 4], ecx
mov dword [eax + 0x10], ecx
xor ecx, ecx
mov dword [eax], 0x44121c
mov dword [eax + 8], ecx
mov dword [eax + 0xc], ecx
mov dword [eax + 0x14], 0x443844
jmp 0x4e2450
xor eax, eax
mov ecx, dword [esp + 0x30]
mov dword [ecx], eax
test eax, eax
je 0x4e263a
mov edi, 0x50
call fcn.00450d70
test eax, eax
je 0x4e248c
mov edx, dword [ebp + 8]
mov ecx, dword [edx + 0x1b4]
lea edi, [ecx + 1]
push ecx
mov dword [edx + 0x1b4], edi
mov edx, dword [esp + 0x38]
push 2
call fcn.004a9b10
jmp 0x4e248e
xor eax, eax
mov edx, dword [esp + 0x30]
mov ecx, dword [edx]
mov dword [ecx + 8], eax
test eax, eax
je 0x4e263a
mov eax, dword [edx]
mov ecx, dword [esp + 0x2c]
inc dword [esp + 0x20]
add eax, 0xc
mov dword [esp + 0x30], eax
cmp dword [esp + 0x10], ecx
jb 0x4e22a0
jmp 0x4e24ca
mov edx, dword [esp + 0x2c]
cmp dword [esp + 0x10], edx
jb case.default.0x4e22d2
cmp dword [esp + 0x20], 4
ja case.default.0x4e22d2
mov eax, dword [esp + 0x1c]
mov edx, dword [eax + 0x28]
mov edi, dword [esp + 0x68]
add eax, 0x28
xor ebx, ebx
cmp edx, ebx
je 0x4e2528
mov eax, edi
and eax, 0x200
xor ecx, ecx
or eax, ecx
jne 0x4e2528
mov eax, dword [edx + 0xc]
cmp eax, ebx
je 0x4e2521
mov ecx, dword [edx + 8]
mov ecx, dword [ecx + 0x20]
mov esi, dword [eax + 8]
cmp ecx, dword [esi + 0x20]
je 0x4e2514
mov eax, dword [eax + 0xc]
cmp eax, ebx
jne 0x4e2503
jmp 0x4e2521
mov edi, 0x200
mov dword [esp + 0x68], edi
mov dword [esp + 0x6c], ebx
mov edx, dword [edx + 0xc]
cmp edx, ebx
jne 0x4e24e9
mov edx, dword [ebp + 8]
mov eax, dword [esp + 0x44]
mov eax, dword [edx + eax*4 + 0x38]
and edi, 0x20000200
xor ecx, ecx
cmp eax, dword [edx + 0x44]
jne 0x4e255b
mov esi, edi
or esi, ecx
jne 0x4e255b
mov esi, dword [edx + 0x140]
cmp esi, ebx
je 0x4e255b
cmp dword [esp + 0x20], 4
je 0x4e25f2
push eax
mov eax, dword [ebp + 0xc]
push ecx
mov ecx, dword [ebp + 8]
mov edx, edi
and edx, 0xfffff3ff
push edx
push eax
push ecx
call fcn.004aa560
mov esi, eax
cmp esi, ebx
je 0x4e25e6
cmp dword [esp + 0x20], 1
jbe 0x4e25f2
mov eax, dword [0x551d48]
cmp eax, ebx
jge 0x4e258d
xor eax, eax
jmp 0x4e2594
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [eax]
push 0x10
push 0x20
call fcn.00547721
cmp eax, ebx
je 0x4e25e6
mov edx, dword [esp + 0x20]
mov ecx, dword [ebp + 8]
push eax
mov dword [eax + 8], ebx
mov dword [eax + 0xc], ebx
mov dword [eax + 0x10], ebx
mov dword [eax], 0x441b60
mov dword [eax + 4], 9
push ebx
mov dword [eax + 0x14], esi
mov dword [eax + 0x18], 1
mov dword [eax + 0x1c], edx
mov eax, dword [ebp + 0xc]
and edi, 0xc00
push edi
push eax
push ecx
call fcn.004aa560
mov esi, eax
cmp esi, ebx
jne 0x4e25f2
mov edx, dword [ebp + 8]
mov byte [edx + 0x188], 1
xor esi, esi
mov eax, dword [esp + 0x1c]
mov dword [eax + 0x14], esi
cmp esi, ebx
je 0x4e263a
mov ecx, dword [ebp + 0x10]
mov esi, eax
mov dword [esi + 0x24], ecx
call fcn.004e0210
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov edx, dword [ebp + 0x14]
mov esi, dword [ebp + 8]
push edx
mov edx, dword [ebp + 0xc]
push 0x44384c
mov ecx, 0xbca
call fcn.004a7840
add esp, 8
jmp 0x4e2644
cmp eax, 0x8007000e
jne 0x4e265a
mov eax, dword [ebp + 8]
mov byte [eax + 0x188], 1
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x4e265a
add dword [ecx + 0x10], 0xffffffff
jne 0x4e265a
mov edx, dword [ecx]
mov eax, dword [edx]
push 1
call eax
mov dword [esp + 0x1c], 0
mov esi, dword [esp + 0x1c]
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x14