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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x46c
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x468], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0x14]
push ebx
mov ebx, dword [ebp + 0xc]
mov edx, ebx
shr edx, 1
and edx, 1
mov dword [esp + 0x20], edx
push esi
mov edx, ebx
push edi
and edx, 1
xor edi, edi
and ebx, 0xfffffffc
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x30], edx
mov dword [esp + 0x1c], edi
mov dword [ebp + 0xc], ebx
je 0x1003a511
push ecx
lea edx, [esp + 0x14]
push eax
call fcn.1007a750
add esp, 8
test bl, 1
je 0x1003a3e6
mov esi, eax
test esi, esi
je 0x1003a3dc
mov eax, dword [esp + 0x10]
inc eax
mov ecx, 0x400
cmp eax, ecx
cmovb ecx, eax
push ecx
lea eax, [esp + 0x6c]
push esi
push eax
call fcn.100a0c1c
add esp, 0xc
mov byte [esp + 0x467], 0
push esi
call dword [0x100ffd84]
add esp, 4
lea ecx, [esp + 0x68]
mov dword [esp + 0x14], ecx
jmp 0x1003a401
mov edi, eax
mov dword [esp + 0x1c], eax
test edi, edi
je 0x1003a3f7
cmp dword [esp + 0x10], 0
jge 0x1003a3fd
xor edi, edi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x14], edi
mov eax, dword [0x101012a8]
test eax, eax
je 0x1003a4e4
mov esi, dword [eax]
push eax
push eax
call sym.glib_2.dll_g_slist_delete_link
mov ecx, dword [esp + 0x20]
mov dword [0x101012a8], eax
mov eax, dword [esi]
add esp, 8
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x1003a445
test dl, dl
je 0x1003a441
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x1003a445
add eax, 2
add ecx, 2
test dl, dl
jne 0x1003a425
xor eax, eax
jmp 0x1003a44a
sbb eax, eax
or eax, 1
test eax, eax
jne 0x1003a49d
mov eax, dword [esi + 4]
and eax, ebx
cmp eax, dword [esi + 4]
jne 0x1003a49d
push dword [esp + 0x14]
push dword [esi + 8]
call sym.glib_2.dll_g_pattern_match_simple
add esp, 8
test eax, eax
je 0x1003a49d
mov eax, dword [esi]
test eax, eax
je 0x1003a47b
push eax
call dword [0x100ffd84]
add esp, 4
mov eax, dword [esi + 8]
test eax, eax
je 0x1003a48c
push eax
call dword [0x100ffd84]
add esp, 4
push esi
call dword [0x100ffd84]
add esp, 4
test edi, edi
je 0x1003a511
push edi
jmp 0x1003a508
mov edx, dword [esi + 4]
lea ecx, [esp + 0x38]
call fcn.1003a170
push dword [esi + 8]
lea eax, [esp + 0x3c]
push eax
push str.Did_not_see_expected_message__s:__s
call sym.glib_2.dll_g_strdup_printf
add esp, 0xc
mov esi, eax
push 0
push esi
push ebx
push dword [esp + 0x24]
call sym.glib_2.dll_g_log_default_handler
add esp, 0x10
test esi, esi
je 0x1003a4de
push esi
call dword [0x100ffd84]
add esp, 4
or ebx, 2
mov dword [ebp + 0xc], ebx
mov edx, 0x20
mov eax, 1
mov edi, edi
ror eax, 1
dec edx
mov dword [esp + 0x10], edx
test ebx, eax
jne 0x1003a526
test edx, edx
jg 0x1003a4f0
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x1003a511
push eax
call dword [0x100ffd84]
add esp, 4
mov ecx, dword [esp + 0x474]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.1009967c
mov esp, ebp
pop ebp
ret
test edx, edx
js 0x1003a4ff
mov esi, dword [ebp + 0xc]
lea ecx, [ecx]
mov ebx, 1
mov ecx, edx
shl ebx, cl
test esi, ebx
je 0x1003a786
xor edi, edi
mov dword [esp + 0x20], edi
cmp dword [esp + 0x28], edi
je 0x1003a550
or ebx, 2
cmp dword [esp + 0x30], edi
je 0x1003a559
or ebx, 1
push 0x101014f0
call dword [0x101015e0]
mov ecx, 0x101014dc
call fcn.100786a0
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
mov eax, dword [esp + 0x18]
test eax, eax
mov ecx, 0x100e2aa5
cmovne ecx, eax
call fcn.10039b90
mov edx, eax
test esi, esi
je 0x1003a593
or ebx, 1
inc esi
mov dword [esp + 0x24], esi
test edx, edx
je 0x1003a5a1
mov ecx, dword [edx + 4]
jmp 0x1003a5a6
mov ecx, 5
mov eax, dword [0x100ffcc8]
or eax, ecx
test ebx, eax
je 0x1003a5b4
or ebx, 2
mov eax, ebx
and eax, 1
mov dword [esp + 0x2c], eax
je 0x1003a5c6
mov esi, fcn.1003aa80
jmp 0x1003a5f1
test edx, edx
je 0x1003a5e5
test ebx, ebx
je 0x1003a5e5
mov ecx, dword [edx + 8]
test ecx, ecx
je 0x1003a5e5
mov eax, dword [ecx + 4]
and eax, ebx
cmp eax, ebx
je 0x1003a652
mov ecx, dword [ecx + 0x10]
test ecx, ecx
jne 0x1003a5d5
mov edi, dword [0x101012b4]
mov esi, dword [sym.glib_2.dll_g_log_default_handler]
push 0x101014f0
call dword [0x101015e8]
push dword [esp + 0x24]
mov ecx, 0x101014dc
call fcn.100786a0
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push edi
push dword [esp + 0x18]
mov edi, dword [esp + 0x20]
push ebx
push edi
call esi
mov esi, ebx
add esp, 0x10
and esi, 2
je 0x1003a65e
test bl, 4
jne 0x1003a65e
mov eax, dword [0x101012ac]
test eax, eax
je 0x1003a65a
push dword [0x101014ec]
push dword [esp + 0x18]
push ebx
push edi
call eax
add esp, 0x10
test eax, eax
jne 0x1003a65a
mov eax, 1
jmp 0x1003a662
mov edi, dword [ecx + 0xc]
mov esi, dword [ecx + 8]
jmp 0x1003a5f1
xor eax, eax
jmp 0x1003a662
mov eax, dword [esp + 0x20]
test esi, esi
je 0x1003a768
test eax, eax
jne 0x1003a768
lea eax, [esp + 0x34]
push eax
call sym.glib_2.dll_g_get_charset
add esp, 4
test eax, eax
je 0x1003a6e2
mov ecx, str.Unspecified_fatal_error_encountered__aborting.
call fcn.1005da20
cmp byte [eax], 0
je 0x1003a6bf
cmp dword [0x10101470], 0
jne 0x1003a6ad
push str.g_convert_error
call sym.glib_2.dll_g_quark_from_static_string
add esp, 4
mov dword [0x10101470], eax
push str.Invalid_byte_sequence_in_conversion_input
call sym.glib_2.dll_glib_gettext
add esp, 4
jmp 0x1003a744
mov ecx, str.Unspecified_fatal_error_encountered__aborting.
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1003a6c7
sub ecx, edx
push ecx
push str.Unspecified_fatal_error_encountered__aborting.
call sym.glib_2.dll_g_strndup
add esp, 8
mov esi, eax
jmp 0x1003a746
mov ecx, dword [esp + 0x34]
test ecx, ecx
je 0x1003a721
push 0
mov edx, 0x100e2e3c
call fcn.100144a0
mov edi, eax
add esp, 4
cmp edi, 0xffffffff
je 0x1003a744
push 0
push 0
push 0
push edi
push 0xffffffffffffffff
push str.Unspecified_fatal_error_encountered__aborting.
call sym.glib_2.dll_g_convert_with_iconv
add esp, 0x18
mov ecx, edi
mov esi, eax
call fcn.10014810
jmp 0x1003a746
push str.to_codeset___NULL
push 0x365
push str.......glibgconvert.c
push str.file__s:_line__d:_assertion___s_failed
push 8
push str.Glib
call sym.glib_2.dll_g_log
add esp, 0x18
xor esi, esi
push 0x10010
push 0
push esi
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x1003a7c8
cmp dword [esp + 0x2c], 0
jne 0x1003a7c8
int3
mov eax, dword [esp + 0x24]
dec eax
push eax
mov ecx, 0x101014dc
call fcn.100786a0
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov edx, dword [esp + 0x10]
mov esi, dword [ebp + 0xc]
mov ecx, edx
test edx, edx
js 0x1003a791
cmp edx, 0x20
jle 0x1003a796
mov ecx, 0x20
mov eax, 1
rol eax, cl
test ecx, ecx
jle 0x1003a4ff
ror eax, 1
dec ecx
test esi, eax
jne 0x1003a7b5
test ecx, ecx
jg 0x1003a7a5
jmp 0x1003a4ff
mov edx, ecx
mov dword [esp + 0x10], edx
test ecx, ecx
jns 0x1003a530
jmp 0x1003a4ff
call dword [0x100a11a0]
int3