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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x1010e2b0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
cmp edx, 2
jne 0x10030343
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ebx, dword [0x1010e2c0]
mov esi, eax
mov dword [ebp - 0x28], esi
cmp ebx, 0xffffffff
je 0x10030164
mov eax, dword [0x1010f3b4]
mov edi, dword [0x1010e2b0]
mov ecx, edi
and ecx, 0x1f
xor edi, eax
ror edi, cl
cmp edi, 0xffffffff
je 0x10076d39
test edi, edi
je 0x10076d0d
push ebx
mov ecx, edi
call dword [0x10110268]
call edi
mov ebx, eax
test ebx, ebx
jne 0x10076d70
mov ebx, dword [0x1010e2c0]
push 0x10006aa4
push 0x10006a9c
mov edx, 0x10006b48
mov ecx, 6
call fcn.10037be0
add esp, 8
mov edi, eax
push 0xffffffffffffffff
push ebx
test edi, edi
je 0x10076d7a
mov ecx, edi
call dword [0x10110268]
call edi
test eax, eax
je 0x10076d9c
push 0x364
push 2
call sym.ucrtbase.dll__calloc_base
mov ebx, eax
add esp, 8
mov dword [ebp - 0x2c], ebx
test ebx, ebx
je 0x10076d85
mov eax, dword [0x1010e2c0]
mov edx, 0x10006b48
push 0x10006aa4
push 0x10006a9c
mov ecx, 6
mov dword [ebp - 0xc], eax
call fcn.10037be0
add esp, 8
mov edi, eax
push ebx
push dword [ebp - 0xc]
test edi, edi
je 0x10076da8
mov ecx, edi
call dword [0x10110268]
call edi
test eax, eax
je 0x10076db3
lea eax, [ebp - 8]
mov dword [ebp - 0x1c], 5
mov edi, ebx
mov dword [ebp - 0x18], eax
mov ebx, 2
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x10]
mov dword [ebp - 0x24], 4
mov dword [ebp - 0x30], eax
mov esi, 0x1010f370
lea ecx, [ebx + 0x41]
jmp 0x10030230
mov dword [ebp - 8], edi
mov dword [ebp - 0x10], esi
mov dword [edi + 0x18], 1
mov eax, dword [ebp - 8]
mov dword [ebp - 0x14], 5
mov dword [eax], 0x10006ab8
mov eax, dword [ebp - 8]
mov dword [eax + 0x350], 1
mov eax, dword [ebp - 8]
mov dword [eax + 0x48], 0x1010e8a0
mov eax, dword [ebp - 8]
mov word [eax + 0x6c], cx
mov eax, dword [ebp - 8]
mov word [eax + 0x172], cx
mov eax, dword [ebp - 8]
mov dword [eax + 0x34c], 0
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.100303c1
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], 4
push eax
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x24]
push eax
call fcn.10030520
add esi, 4
add edi, 0x364
mov ecx, 0x43
sub ebx, 1
jne 0x10030230
push 0
call sym.ucrtbase.dll__free_base
mov esi, dword [ebp - 0x28]
add esp, 4
mov ebx, dword [ebp - 0x2c]
test ebx, ebx
je 0x10076d9c
mov edx, dword [0x1010e2c4]
mov edi, dword [0x1010f3b4]
mov dword [ebp - 0xc], edx
mov ecx, dword [0x1010e2b0]
xor edi, dword [0x1010e2b0]
and ecx, 0x1f
ror edi, cl
cmp edi, 0xffffffff
je 0x10076df2
test edi, edi
je 0x10076dc3
push edx
mov ecx, edi
call dword [0x10110268]
call edi
push esi
mov edi, eax
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
imul eax, edi, 0x364
add eax, ebx
je 0x100303ba
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1005cc20
mov esp, ebp
pop ebp
ret
sub edx, 0
je 0x10030398
sub edx, 1
je 0x10030382
sub edx, 2
jne 0x100303ba
mov ecx, dword [0x1010e2c0]
cmp ecx, 0xffffffff
je 0x1003036c
call fcn.10029fa0
mov esi, eax
test esi, esi
jne 0x10076cd9
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1005cc20
mov esp, ebp
pop ebp
ret
call fcn.1003323c
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1005cc20
mov esp, ebp
pop ebp
ret
cmp dword [ebp + 8], 0
je 0x100303b6
mov cl, 1
call fcn.10033517
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1005cc20
mov esp, ebp
pop ebp
ret
xor cl, cl
jmp 0x100303a0
xor eax, eax
jmp 0x10030332
mov ecx, dword [0x1010e2c0]
xor edx, edx
call fcn.10032a89
mov edi, esi
mov ebx, 2
mov ecx, edi
call fcn.1002ef2c
add edi, 0x364
sub ebx, 1
jne 0x10076ced
push esi
call sym.ucrtbase.dll__free_base
add esp, 4
jmp 0x1003036c
mov edi, 0x10006a9c
mov ecx, dword [edi]
call fcn.10032fe0
test eax, eax
jne 0x10076d45
add edi, 4
cmp edi, 0x10006aa4
jne 0x10076d12
push 0xffffffffffffffff
call fcn.10032d19
add esp, 4
mov ecx, 0x1010f3b4
xchg dword [ecx], eax
push ebx
call dword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsGetValue]
jmp 0x10030154
push 0x10006aa4
push eax
call dword [sym.imp.api_ms_win_core_libraryloader_l1_1_0.dll_GetProcAddress]
mov edi, eax
test edi, edi
je 0x10076d28
push edi
call fcn.10032d19
add esp, 4
mov ecx, 0x1010f3b4
xchg dword [ecx], eax
test edi, edi
je 0x10076d39
jmp 0x10030149
cmp ebx, 0xffffffff
je 0x10076d9c
jmp 0x100302d2
call dword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsSetValue]
jmp 0x10030197
mov ecx, dword [0x1010e2c0]
xor edx, edx
call fcn.10032a89
push 0
call sym.ucrtbase.dll__free_base
add esp, 4
push esi
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
jmp 0x100303ba
call dword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsSetValue]
jmp 0x100301f7
mov ecx, dword [0x1010e2c0]
xor edx, edx
call fcn.10032a89
push ebx
jmp 0x10076d94
mov edi, 0x10006a9c
mov ecx, dword [edi]
call fcn.10032fe0
test eax, eax
jne 0x10076dfe
add edi, 4
cmp edi, 0x10006aa4
jne 0x10076dc8
push 0xffffffffffffffff
call fcn.10032d19
add esp, 4
mov ecx, 0x1010f3b4
xchg dword [ecx], eax
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_TlsGetValue]
jmp 0x10030316
push 0x10006aa4
push eax
call dword [sym.imp.api_ms_win_core_libraryloader_l1_1_0.dll_GetProcAddress]
mov edi, eax
test edi, edi
je 0x10076dde
push edi
call fcn.10032d19
add esp, 4
mov ecx, 0x1010f3b4
xchg dword [ecx], eax
mov edx, dword [ebp - 0xc]
test edi, edi
je 0x10076df2
jmp 0x1003030b