Function at 0x1004e630
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [ebp + 0x10]
push ebx
push esi
lea ecx, [eax + 0x15af]
push edi
mov edi, eax
mov dword [ebp - 4], edi
mov dword [ebp - 0x18], ecx
cmp eax, ecx
ja case.0x1004e753.216
mov esi, dword [ebp + 8]
mov ebx, dword [ebp + 0x10]
jmp 0x1004e660
xor edx, edx
cmp edi, 0x52fa
ja 0x1004e997
je 0x1004e988
cmp edi, 0x518e
ja 0x1004e8c4
je 0x1004e896
cmp edi, 0xf8a
ja 0x1004e882
je 0x1004e727
mov eax, edi
sub eax, 0xa26
je 0x1004e6b6
sub eax, 0x5b
jne 0x1004ea5e
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x1004ea5e
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esi + 0x24], 0
jne 0x1004e6c9
cmp dword [esi + 0x20], 0
jbe 0x1004e718
mov edi, 0x65d0
mov edi, edi
mov eax, edi
sub eax, 0x65d0
je 0x1004e70a
sub eax, 0x61
je 0x1004e6e8
sub eax, 0x61
jne 0x1004e70d
dec dword [esi + 0x2c]
jmp 0x1004e70d
cmp dword [esi + 0x24], 0
jne 0x1004e6f4
cmp dword [esi + 0x20], 0
jbe 0x1004e70d
mov eax, dword [esi + 0x1c]
push esi
push 0
push 0x69d0
push eax
call fcn.100527e0
add esp, 0x10
jmp 0x1004e6e8
inc dword [esi + 0x2c]
add edi, 0x61
cmp edi, 0x6692
jbe 0x1004e6d0
mov edi, dword [ebp - 4]
mov dword [esi + 0x24], 1
jmp 0x1004ea5e
cmp dword [0x1007c478], edx
jne 0x1004e83c
xor edi, edi
jmp 0x1004e740
cmp edi, 0xd8
ja case.0x1004e753.1
movzx ecx, byte [edi + 0x1004eaa0]
jmp dword [ecx*4 + 0x1004ea78]
dec dword [esi + ebx*4 + 4]
jmp case.0x1004e753.1
mov eax, 1
cmp dword [ebp - 8], eax
jne 0x1004e777
cmp dword [esi + ebx*4 + 4], 0
mov dword [ebp - 0xc], eax
je 0x1004e77e
mov dword [ebp - 0xc], 0
lea edx, [esi + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp case.0x1004e753.1
xor eax, eax
cmp dword [ebp - 8], 0x102
lea ecx, [esi + 0x10]
setne al
push ecx
mov dword [ebp - 0x14], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
jmp case.0x1004e753.1
mov edx, dword [esi + 0x30]
mov ecx, dword [ebp + 0x14]
mov eax, dword [esi + ebx*4 + 0x28]
mov dword [ebp - 0x20], edx
mov edx, dword [ecx]
push edx
mov dword [ebp - 0x1c], eax
push 0
lea eax, [ebp - 0x20]
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov dword [ebp - 8], eax
jmp case.0x1004e753.1
cmp dword [ebp - 0xc], 0
je 0x1004e7df
mov ecx, dword [esi + ebx*4 + 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
jmp case.0x1004e753.1
mov eax, dword [ebp - 0x14]
mov dword [ebp + 0x10], eax
jmp case.0x1004e753.1
inc dword [esi + ebx*4 + 4]
lea ecx, [esi + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp case.0x1004e753.1
lea eax, [esi + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor ebx, ebx
cmp dword [esi + 0xc], ebx
sete bl
add edi, 0x1b
lea ecx, [edi + 0x1a7]
cmp ecx, 0x27f
jbe 0x1004e740
mov edi, dword [ebp - 4]
jmp 0x1004ea5e
mov edi, 0x5776
mov eax, edi
sub eax, 0x5776
je 0x1004e855
sub eax, 0x62
je case.0x1004e753.216
jmp 0x1004e86f
mov edx, dword [ebp + 0x14]
mov eax, dword [edx]
mov ecx, dword [ebp + 0xc]
push eax
push ecx
push esi
call dword [0x1007c464]
neg eax
sbb eax, eax
neg eax
mov dword [ebp + 0x10], eax
add edi, 0x62
cmp edi, 0x57d8
jbe 0x1004e841
mov edi, dword [ebp - 4]
jmp 0x1004ea5e
cmp edi, 0x5133
jne 0x1004ea5e
mov dword [ebp - 0x10], edx
jmp 0x1004ea5e
mov edx, dword [0x1007c49c]
push esi
push edx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, dword [0x1007c49c]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, esi
jne 0x1004ea5e
mov dword [ebp - 0x10], 1
jmp 0x1004ea5e
mov eax, edi
sub eax, 0x51e9
je 0x1004e934
sub eax, 0x5b
je 0x1004e912
sub eax, 0x5b
jne 0x1004ea5e
jmp 0x1004e8e0
mov eax, dword [esi + 0x3c]
cmp eax, edx
je 0x1004e9b8
mov ecx, dword [esi + 0x48]
push ecx
call eax
add esp, 4
test eax, eax
je 0x1004e906
cmp dword [esi + 0x54], 0
je 0x1004ea5e
xor edx, edx
jmp 0x1004e8e0
mov dword [esi + 0x54], 0
jmp 0x1004ea5e
mov edx, dword [esi + 0x40]
push edx
push 0
push 0x3d84
push 0
push 0
mov dword [esi], 2
call fcn.10018b50
add esp, 0x14
jmp 0x1004ea5e
add byte [ebx - 3], dh
jae 0x1004e933
cli
xor al, byte [edx + 0x39]
push ebp
invalid
mov eax, dword [ebp + 0x10]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [esi + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
jmp 0x1004ea5e
cmp edi, 0x5466
ja 0x1004e9ec
je 0x1004e9e8
mov eax, edi
sub eax, 0x5355
je 0x1004e9cd
sub eax, 0x5b
je 0x1004e9c0
sub eax, 0x5b
jne 0x1004ea5e
mov dword [esi + 0x54], edx
jmp 0x1004ea5e
inc esp
inc edi
das
xor byte [ecx - 0x16a3a977], dl
xchg ecx, eax
add byte [eax], al
add byte [ebx - 0x3dc4a7ba], cl
mov eax, dword [esi + 0x58]
cmp eax, edx
je 0x1004ea5e
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x58], 0
jmp 0x1004ea5e
mov dword [esi], edx
jmp 0x1004ea5e
mov eax, edi
sub eax, 0x54c1
je 0x1004ea49
sub eax, 0x5b
je 0x1004ea3d
sub eax, 0x137e
jne 0x1004ea5e
mov eax, dword [esi]
sub eax, edx
je 0x1004ea36
dec eax
je 0x1004ea24
dec eax
jne 0x1004ea36
push esi
push eax
push eax
push 0x47a5
call fcn.10043410
add esp, 0x10
mov edi, 0x689a
jmp 0x1004ea5e
push 0
push 0
push 0x1421
push esi
call fcn.10044d30
add esp, 0x10
mov edi, 0x689a
jmp 0x1004ea5e
lea ecx, [esi + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x1004ea5e
mov edx, dword [esi + 0x44]
push 0x31c9
push 0
push 0
push edx
call fcn.1004e2d0
add esp, 0x10
add edi, 0x5b
mov dword [ebp - 4], edi
cmp edi, dword [ebp - 0x18]
jbe 0x1004e660
mov eax, dword [ebp + 0x10]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret