Function at 0x411f0a
Capabilities:
Set thread local storage value

Disassembly:
push edi
push esi
push ebx
sub esp, 0x10
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x411ba8
mov esi, dword [esp + 0x28]
test esi, esi
je 0x411be0
add esp, 0x10
mov eax, 1
pop ebx
pop esi
pop edi
ret 0xc
cmp eax, 1
je 0x411c08
cmp eax, 3
jne 0x411b96
mov eax, dword [0x4e2600]
test eax, eax
je 0x411e70
mov ebx, dword [eax + 0x18]
test ebx, ebx
je 0x411c38
mov edx, dword [eax + 0x18]
cmp dword [edx], 0xffffffff
je 0x411b96
mov edx, dword [eax + 0x18]
test edx, edx
je 0x411c50
mov eax, dword [eax + 0x18]
jmp 0x411c5c
mov eax, dword [0x4e25f0]
test eax, eax
je 0x411b96
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_RemoveVectoredExceptionHandler]
mov dword [0x4e25f0], 0
sub esp, 4
jmp 0x411b96
mov dword [esp + 4], 0x40f2a0
mov dword [esp], 1
call dword [sym.imp.KERNEL32.dll_AddVectoredExceptionHandler]
sub esp, 8
mov dword [0x4e25f0], eax
mov eax, 1
add esp, 0x10
pop ebx
pop esi
pop edi
ret 0xc
mov dword [eax + 0x18], 0x4d1040
mov edx, 0x4d1040
jmp 0x411bc9
mov dword [eax + 0x18], 0x4d1040
mov eax, 0x4d1040
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 0x411b96
test byte [eax + 0x20], 0x30
je 0x411d30
mov eax, dword [eax + 0xb4]
test eax, eax
je 0x411c8d
call fcn.004118e0
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x411cbf
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 0x411cb1
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.0040f070
lea eax, [ebx + 0x38]
mov dword [esp], eax
call fcn.0040f230
cmp eax, 1
je 0x411ef1
mov eax, dword [ebx + 0xb0]
mov dword [ebx + 0x38], 0xffffffff
test eax, eax
jne 0x411cf6
mov eax, ebx
call fcn.00410a70
mov eax, dword [0x4e2600]
test eax, eax
je 0x411e42
mov ebx, dword [eax + 0x18]
test ebx, ebx
je 0x411e58
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 0x411b96
mov edx, dword [ebx + 0x68]
mov eax, dword [eax + 0x18]
test edx, edx
jne 0x411e00
test eax, eax
je 0x411d4e
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 0x411d6b
call fcn.004118e0
lea esi, [ebx + 0x1c]
lea edi, [ebx + 0x38]
test byte [ebx + 0x24], 4
je 0x411ed8
mov eax, dword [ebx + 0x14]
mov dword [ebx], 0xdeadbeef
test eax, eax
je 0x411d94
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.0040f070
mov dword [esp], edi
call fcn.0040f230
cmp eax, 1
je 0x411ef1
mov esi, dword [ebx + 0xb0]
mov dword [ebx + 0x38], 0xffffffff
test esi, esi
jne 0x411dcc
mov eax, ebx
call fcn.00410a70
mov eax, dword [0x4e2600]
test eax, eax
jne 0x411d03
call fcn.00415b10
mov ecx, dword [eax + 0x18]
mov eax, dword [0x4e2600]
test ecx, ecx
je 0x411e58
test eax, eax
jne 0x411d0e
call fcn.00415b10
jmp 0x411d0e
test eax, eax
je 0x411e10
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.0040f070
lea eax, [ebx + 0x38]
mov dword [esp], eax
call fcn.0040f230
cmp eax, 1
je 0x411ef1
mov dword [ebx + 0x38], 0xffffffff
jmp 0x411b96
call fcn.00415b10
mov edx, eax
mov eax, dword [0x4e2600]
mov edi, dword [edx + 0x18]
test edi, edi
jne 0x411dea
lea esi, [esi]
mov dword [eax + 0x18], 0x4d1040
mov eax, 0x4d1040
jmp 0x411d11
call fcn.00415b10
mov ecx, dword [eax + 0x18]
mov eax, dword [0x4e2600]
test ecx, ecx
je 0x411c38
test eax, eax
jne 0x411bc6
call fcn.00415b10
mov eax, dword [eax + 0x18]
cmp dword [eax], 0xffffffff
je 0x411b96
mov eax, dword [0x4e2600]
test eax, eax
jne 0x411bce
call fcn.00415b10
mov eax, dword [eax + 0x18]
test eax, eax
mov eax, dword [0x4e2600]
je 0x411c50
test eax, eax
jne 0x411bd5
call fcn.00415b10
jmp 0x411bd5
mov dword [esp], esi
call fcn.0040f070
mov dword [esp], edi
call fcn.0040f230
cmp eax, 1
jne 0x411e36
call fcn.00410900
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.0040b2b0
mov eax, dword [0x4e2600]
test eax, eax
je 0x412116
cmp dword [eax + 0x30], 0
jne 0x412135
mov eax, dword [0x4e2600]
mov dword [eax + 0x30], 0x4d1038
mov eax, 0x4d1038
mov dword [esp], eax
call fcn.0040eb90
mov eax, dword [ebp - 0x1c]
lea ebx, [eax + 0x1c]
mov dword [esp], ebx
call fcn.0040eb90
mov eax, dword [0x4e2600]
test eax, eax
je 0x41215c
cmp dword [eax + 0x14], 0
jne 0x41213d
mov eax, dword [0x4e2600]
mov dword [eax + 0x14], 0x4e25dc
mov eax, 0x4e25dc
cmp dword [eax], 1
je 0x412152
call fcn.004109f0
mov eax, dword [0x4e2600]
test eax, eax
je 0x41218c
cmp dword [eax + 0x18], 0
jne 0x412145
mov eax, dword [0x4e2600]
mov dword [eax + 0x18], 0x4d1040
mov eax, 0x4d1040
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.0040eee0
lea eax, [esi + 0x70]
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.msvcrt.dll__setjmp3
mov edx, dword [0x4e2600]
test eax, eax
jne 0x4121ad
test edx, edx
je 0x412228
cmp dword [edx + 0x30], 0
jne 0x4121d5
mov dword [edx + 0x30], 0x4d1038
mov eax, 0x4d1038
mov dword [esp], eax
call fcn.0040eee0
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx + 8]
test eax, eax
je 0x41224e
mov edx, dword [edx + 4]
mov dword [esp], edx
call eax
mov ebx, eax
mov eax, dword [0x4e2600]
test eax, eax
je 0x412201
cmp dword [eax + 0x30], 0
jne 0x412220
mov dword [eax + 0x30], 0x4d1038
mov eax, 0x4d1038
mov dword [esp], eax
call fcn.0040eb90
mov eax, dword [ebp - 0x1c]
mov dword [eax + 4], ebx
mov eax, dword [eax + 0xb4]
test eax, eax
je 0x41207e
call fcn.004118e0
mov ebx, dword [ebp - 0x1c]
lea esi, [ebx + 0x1c]
mov dword [esp], esi
call fcn.0040eb90
mov eax, ebx
mov ebx, dword [ebx + 4]
mov eax, dword [eax + 0x18]
test eax, eax
je 0x4120a2
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 0x412293
mov dword [esp], esi
call fcn.0040eee0
mov dword [esp], esi
call fcn.0040f070
mov eax, dword [ebp - 0x1c]
mov dword [eax + 0x1c], 0xffffffff
mov dword [eax + 0x68], 1
mov esi, 0x4d1038
mov eax, dword [0x4e2600]
test eax, eax
je 0x41226f
cmp dword [eax + 0x30], 0
je 0x412261
mov eax, dword [eax + 0x30]
mov dword [esp], eax
call fcn.0040eee0
test eax, eax
jne 0x412258
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_Sleep]
push eax
jmp 0x4120dc
call fcn.00415b10
mov edx, eax
mov eax, dword [0x4e2600]
cmp dword [edx + 0x30], 0
je 0x411f35
test eax, eax
jne 0x412135
call fcn.00415b10
mov eax, dword [eax + 0x30]
jmp 0x411f46
mov eax, dword [eax + 0x14]
jmp 0x411f84
mov eax, dword [0x4e2600]
mov eax, dword [eax + 0x18]
jmp 0x411fba
mov eax, dword [0x4e2600]
jmp 0x411f9f
call fcn.00415b10
mov edx, eax
mov eax, dword [0x4e2600]
cmp dword [edx + 0x14], 0
je 0x411f73
test eax, eax
jne 0x41213d
call fcn.00415b10
mov eax, dword [eax + 0x14]
cmp dword [eax], 1
jne 0x411f8d
jmp 0x411f92
call fcn.00415b10
mov edx, eax
mov eax, dword [0x4e2600]
cmp dword [edx + 0x18], 0
je 0x411fa9
test eax, eax
jne 0x41214a
call fcn.00415b10
jmp 0x41214a
test edx, edx
je 0x4121e2
cmp dword [edx + 0x30], 0
jne 0x4121dd
mov eax, dword [0x4e2600]
mov dword [eax + 0x30], 0x4d1038
mov eax, 0x4d1038
mov dword [esp], eax
call fcn.0040eb90
jmp 0x41207e
mov eax, dword [edx + 0x30]
jmp 0x41201e
mov eax, dword [edx + 0x30]
jmp 0x4121c8
call fcn.00415b10
mov edx, dword [0x4e2600]
cmp dword [eax + 0x30], 0
je 0x4121b7
test edx, edx
jne 0x4121dd
call fcn.00415b10
mov eax, dword [eax + 0x30]
jmp 0x4121c8
call fcn.00415b10
mov edx, eax
mov eax, dword [0x4e2600]
cmp dword [edx + 0x30], 0
je 0x412055
test eax, eax
jne 0x412220
call fcn.00415b10
mov eax, dword [eax + 0x30]
jmp 0x412061
call fcn.00415b10
mov edx, dword [0x4e2600]
cmp dword [eax + 0x30], 0
je 0x412012
test edx, edx
jne 0x4121d5
call fcn.00415b10
mov eax, dword [eax + 0x30]
jmp 0x41201e
mov ebx, pe_nt_image_headers32
jmp 0x41203e
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll__endthreadex]
mov dword [eax + 0x30], 0x4d1038
mov eax, esi
jmp 0x4120f6
call fcn.00415b10
mov edx, eax
mov eax, dword [0x4e2600]
cmp dword [edx + 0x30], 0
je 0x412261
test eax, eax
jne 0x4120f3
call fcn.00415b10
jmp 0x4120f3
mov edi, dword [ebp - 0x1c]
mov dword [edi], 0xdeadbeef
mov dword [esp], esi
call fcn.0040eee0
mov dword [esp], esi
call fcn.0040f070
mov eax, edi
call fcn.004113b0
mov eax, dword [0x4e2600]
test eax, eax
je 0x4122e8
cmp dword [eax + 0x18], 0
jne 0x412303
mov dword [eax + 0x18], 0x4d1040
mov eax, 0x4d1040
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 0x4120d7
call fcn.00415b10
mov edx, eax
mov eax, dword [0x4e2600]
cmp dword [edx + 0x18], 0
je 0x4122c2
test eax, eax
jne 0x412303
call fcn.00415b10
mov eax, dword [eax + 0x18]
jmp 0x4122ce