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

Disassembly:
push edi
push esi
push ebx
sub esp, 0x10
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x410ed8
mov esi, dword [esp + 0x28]
test esi, esi
je 0x410f10
add esp, 0x10
mov eax, 1
pop ebx
pop esi
pop edi
ret 0xc
cmp eax, 1
je 0x410f38
cmp eax, 3
jne 0x410ec6
mov eax, dword [0x4dd1e0]
test eax, eax
je 0x4111a0
mov ebx, dword [eax + 0x18]
test ebx, ebx
je 0x410f68
mov edx, dword [eax + 0x18]
cmp dword [edx], 0xffffffff
je 0x410ec6
mov edx, dword [eax + 0x18]
test edx, edx
je 0x410f80
mov eax, dword [eax + 0x18]
jmp 0x410f8c
mov eax, dword [0x4dd1d0]
test eax, eax
je 0x410ec6
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_RemoveVectoredExceptionHandler]
mov dword [0x4dd1d0], 0
sub esp, 4
jmp 0x410ec6
mov dword [esp + 4], 0x40e5d0
mov dword [esp], 1
call dword [sym.imp.KERNEL32.dll_AddVectoredExceptionHandler]
sub esp, 8
mov dword [0x4dd1d0], eax
mov eax, 1
add esp, 0x10
pop ebx
pop esi
pop edi
ret 0xc
mov dword [eax + 0x18], 0x4d0030
mov edx, 0x4d0030
jmp 0x410ef9
mov dword [eax + 0x18], 0x4d0030
mov eax, 0x4d0030
mov eax, dword [eax]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ebx, eax
test eax, eax
je 0x410ec6
test byte [eax + 0x20], 0x30
je 0x411060
mov eax, dword [eax + 0xb4]
test eax, eax
je 0x410fbd
call fcn.00410c10
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x410fef
mov dword [esp], eax
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
mov eax, dword [ebx + 0x18]
sub esp, 4
test eax, eax
je 0x410fe1
mov dword [esp], eax
call esi
sub esp, 4
mov dword [ebx + 0x18], 0
mov dword [ebx + 0x14], 0
lea eax, [ebx + 0x1c]
mov dword [esp], eax
call fcn.0040e3a0
lea eax, [ebx + 0x38]
mov dword [esp], eax
call fcn.0040e560
cmp eax, 1
je 0x411221
mov eax, dword [ebx + 0xb0]
mov dword [ebx + 0x38], 0xffffffff
test eax, eax
jne 0x411026
mov eax, ebx
call fcn.0040fda0
mov eax, dword [0x4dd1e0]
test eax, eax
je 0x411172
mov ebx, dword [eax + 0x18]
test ebx, ebx
je 0x411188
mov eax, dword [eax + 0x18]
mov dword [esp + 4], 0
mov eax, dword [eax]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
sub esp, 8
jmp 0x410ec6
mov edx, dword [ebx + 0x68]
mov eax, dword [eax + 0x18]
test edx, edx
jne 0x411130
test eax, eax
je 0x41107e
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
mov eax, dword [ebx + 0xb4]
mov dword [ebx + 0x18], 0
mov dword [ebx + 0x68], 1
test eax, eax
je 0x41109b
call fcn.00410c10
lea esi, [ebx + 0x1c]
lea edi, [ebx + 0x38]
test byte [ebx + 0x24], 4
je 0x411208
mov eax, dword [ebx + 0x14]
mov dword [ebx], 0xdeadbeef
test eax, eax
je 0x4110c4
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
mov dword [ebx + 0x14], 0
mov dword [esp], esi
call fcn.0040e3a0
mov dword [esp], edi
call fcn.0040e560
cmp eax, 1
je 0x411221
mov esi, dword [ebx + 0xb0]
mov dword [ebx + 0x38], 0xffffffff
test esi, esi
jne 0x4110fc
mov eax, ebx
call fcn.0040fda0
mov eax, dword [0x4dd1e0]
test eax, eax
jne 0x411033
call fcn.00414e40
mov ecx, dword [eax + 0x18]
mov eax, dword [0x4dd1e0]
test ecx, ecx
je 0x411188
test eax, eax
jne 0x41103e
call fcn.00414e40
jmp 0x41103e
test eax, eax
je 0x411140
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
lea eax, [ebx + 0x1c]
mov dword [ebx + 0x18], 0
mov dword [esp], eax
call fcn.0040e3a0
lea eax, [ebx + 0x38]
mov dword [esp], eax
call fcn.0040e560
cmp eax, 1
je 0x411221
mov dword [ebx + 0x38], 0xffffffff
jmp 0x410ec6
call fcn.00414e40
mov edx, eax
mov eax, dword [0x4dd1e0]
mov edi, dword [edx + 0x18]
test edi, edi
jne 0x41111a
lea esi, [esi]
mov dword [eax + 0x18], 0x4d0030
mov eax, 0x4d0030
jmp 0x411041
call fcn.00414e40
mov ecx, dword [eax + 0x18]
mov eax, dword [0x4dd1e0]
test ecx, ecx
je 0x410f68
test eax, eax
jne 0x410ef6
call fcn.00414e40
mov eax, dword [eax + 0x18]
cmp dword [eax], 0xffffffff
je 0x410ec6
mov eax, dword [0x4dd1e0]
test eax, eax
jne 0x410efe
call fcn.00414e40
mov eax, dword [eax + 0x18]
test eax, eax
mov eax, dword [0x4dd1e0]
je 0x410f80
test eax, eax
jne 0x410f05
call fcn.00414e40
jmp 0x410f05
mov dword [esp], esi
call fcn.0040e3a0
mov dword [esp], edi
call fcn.0040e560
cmp eax, 1
jne 0x411166
call fcn.0040fc30
lea esi, [esi]
lea esi, [esi]
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x28
mov eax, dword [ecx]
mov dword [ebp - 0x1c], eax
call fcn.0040a5e0
mov eax, dword [0x4dd1e0]
test eax, eax
je 0x411446
cmp dword [eax + 0x30], 0
jne 0x411465
mov eax, dword [0x4dd1e0]
mov dword [eax + 0x30], 0x4d0028
mov eax, 0x4d0028
mov dword [esp], eax
call fcn.0040dec0
mov eax, dword [ebp - 0x1c]
lea ebx, [eax + 0x1c]
mov dword [esp], ebx
call fcn.0040dec0
mov eax, dword [0x4dd1e0]
test eax, eax
je 0x41148c
cmp dword [eax + 0x14], 0
jne 0x41146d
mov eax, dword [0x4dd1e0]
mov dword [eax + 0x14], 0x4dd1bc
mov eax, 0x4dd1bc
cmp dword [eax], 1
je 0x411482
call fcn.0040fd20
mov eax, dword [0x4dd1e0]
test eax, eax
je 0x4114bc
cmp dword [eax + 0x18], 0
jne 0x411475
mov eax, dword [0x4dd1e0]
mov dword [eax + 0x18], 0x4d0030
mov eax, 0x4d0030
mov esi, dword [ebp - 0x1c]
mov dword [esp + 4], esi
mov eax, dword [eax]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push edi
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [esi + 0x3c], eax
mov dword [esp], ebx
call fcn.0040e210
lea eax, [esi + 0x70]
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.msvcrt.dll__setjmp3
mov edx, dword [0x4dd1e0]
test eax, eax
jne 0x4114dd
test edx, edx
je 0x411558
cmp dword [edx + 0x30], 0
jne 0x411505
mov dword [edx + 0x30], 0x4d0028
mov eax, 0x4d0028
mov dword [esp], eax
call fcn.0040e210
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx + 8]
test eax, eax
je 0x41157e
mov edx, dword [edx + 4]
mov dword [esp], edx
call eax
mov ebx, eax
mov eax, dword [0x4dd1e0]
test eax, eax
je 0x411531
cmp dword [eax + 0x30], 0
jne 0x411550
mov dword [eax + 0x30], 0x4d0028
mov eax, 0x4d0028
mov dword [esp], eax
call fcn.0040dec0
mov eax, dword [ebp - 0x1c]
mov dword [eax + 4], ebx
mov eax, dword [eax + 0xb4]
test eax, eax
je 0x4113ae
call fcn.00410c10
mov ebx, dword [ebp - 0x1c]
lea esi, [ebx + 0x1c]
mov dword [esp], esi
call fcn.0040dec0
mov eax, ebx
mov ebx, dword [ebx + 4]
mov eax, dword [eax + 0x18]
test eax, eax
je 0x4113d2
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
mov eax, dword [ebp - 0x1c]
cmp dword [eax + 0x14], 0
mov dword [eax + 0x18], 0
je 0x4115c3
mov dword [esp], esi
call fcn.0040e210
mov dword [esp], esi
call fcn.0040e3a0
mov eax, dword [ebp - 0x1c]
mov dword [eax + 0x1c], 0xffffffff
mov dword [eax + 0x68], 1
mov esi, 0x4d0028
mov eax, dword [0x4dd1e0]
test eax, eax
je 0x41159f
cmp dword [eax + 0x30], 0
je 0x411591
mov eax, dword [eax + 0x30]
mov dword [esp], eax
call fcn.0040e210
test eax, eax
jne 0x411588
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_Sleep]
push eax
jmp 0x41140c
call fcn.00414e40
mov edx, eax
mov eax, dword [0x4dd1e0]
cmp dword [edx + 0x30], 0
je 0x411265
test eax, eax
jne 0x411465
call fcn.00414e40
mov eax, dword [eax + 0x30]
jmp 0x411276
mov eax, dword [eax + 0x14]
jmp 0x4112b4
mov eax, dword [0x4dd1e0]
mov eax, dword [eax + 0x18]
jmp 0x4112ea
mov eax, dword [0x4dd1e0]
jmp 0x4112cf
call fcn.00414e40
mov edx, eax
mov eax, dword [0x4dd1e0]
cmp dword [edx + 0x14], 0
je 0x4112a3
test eax, eax
jne 0x41146d
call fcn.00414e40
mov eax, dword [eax + 0x14]
cmp dword [eax], 1
jne 0x4112bd
jmp 0x4112c2
call fcn.00414e40
mov edx, eax
mov eax, dword [0x4dd1e0]
cmp dword [edx + 0x18], 0
je 0x4112d9
test eax, eax
jne 0x41147a
call fcn.00414e40
jmp 0x41147a
test edx, edx
je 0x411512
cmp dword [edx + 0x30], 0
jne 0x41150d
mov eax, dword [0x4dd1e0]
mov dword [eax + 0x30], 0x4d0028
mov eax, 0x4d0028
mov dword [esp], eax
call fcn.0040dec0
jmp 0x4113ae
mov eax, dword [edx + 0x30]
jmp 0x41134e
mov eax, dword [edx + 0x30]
jmp 0x4114f8
call fcn.00414e40
mov edx, dword [0x4dd1e0]
cmp dword [eax + 0x30], 0
je 0x4114e7
test edx, edx
jne 0x41150d
call fcn.00414e40
mov eax, dword [eax + 0x30]
jmp 0x4114f8
call fcn.00414e40
mov edx, eax
mov eax, dword [0x4dd1e0]
cmp dword [edx + 0x30], 0
je 0x411385
test eax, eax
jne 0x411550
call fcn.00414e40
mov eax, dword [eax + 0x30]
jmp 0x411391
call fcn.00414e40
mov edx, dword [0x4dd1e0]
cmp dword [eax + 0x30], 0
je 0x411342
test edx, edx
jne 0x411505
call fcn.00414e40
mov eax, dword [eax + 0x30]
jmp 0x41134e
mov ebx, pe_nt_image_headers32
jmp 0x41136e
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll__endthreadex]
mov dword [eax + 0x30], 0x4d0028
mov eax, esi
jmp 0x411426
call fcn.00414e40
mov edx, eax
mov eax, dword [0x4dd1e0]
cmp dword [edx + 0x30], 0
je 0x411591
test eax, eax
jne 0x411423
call fcn.00414e40
jmp 0x411423
mov edi, dword [ebp - 0x1c]
mov dword [edi], 0xdeadbeef
mov dword [esp], esi
call fcn.0040e210
mov dword [esp], esi
call fcn.0040e3a0
mov eax, edi
call fcn.004106e0
mov eax, dword [0x4dd1e0]
test eax, eax
je 0x411618
cmp dword [eax + 0x18], 0
jne 0x411633
mov dword [eax + 0x18], 0x4d0030
mov eax, 0x4d0030
mov dword [esp + 4], 0
mov eax, dword [eax]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push edx
push edx
jmp 0x411407
call fcn.00414e40
mov edx, eax
mov eax, dword [0x4dd1e0]
cmp dword [edx + 0x18], 0
je 0x4115f2
test eax, eax
jne 0x411633
call fcn.00414e40
mov eax, dword [eax + 0x18]
jmp 0x4115fe