Function at 0x40a383
Capabilities:
Allocate thread local storage
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x164
mov dword [ebp - 0x14], 0x3f
mov dword [ebp - 0x98], 2
mov dword [ebp - 0x24], 0xb7
mov dword [ebp - 0xb8], 0x84
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x30], 0
mov eax, dword [ebp - 8]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
je 0x40a43e
cmp dword [ebp - 0x34], 0x56
je 0x40a420
cmp dword [ebp - 0x34], 0xba
je 0x40a3f1
jmp 0x40a4db
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileType]
mov dword [0x41c130], eax
mov edx, dword [0x41c0d8]
sub edx, dword [ebp - 0x44]
mov dword [ebp - 0x14], edx
mov eax, dword [0x41c0c8]
xor edx, edx
div dword [ebp - 0x24]
mov dword [0x41c120], eax
jmp 0x40a522
mov dword [ebp - 0xf8], 0x56
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileType]
mov dword [0x41c0c4], eax
jmp 0x40a522
mov dword [ebp - 0xfc], 0x81
mov dword [ebp - 0x100], 0
mov dword [ebp - 0xa0], 0
mov dword [ebp - 0x9c], 0
mov dword [ebp - 0xa8], 0x47
mov dword [ebp - 0xa4], 0
mov dword [ebp - 0x104], 0
mov ecx, dword [ebp - 0x9c]
sub ecx, dword [ebp - 0xa0]
mov dword [ebp - 0xa4], ecx
mov edx, dword [ebp - 0xa8]
push edx
call fcn.0040e5d3
add esp, 4
push str.NsKBdwhZrY.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0x14], eax
push str.mWvwWglFqCt
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0xc], eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x10]
movzx edx, word [ecx]
mov dword [ebp - 8], edx
jmp 0x40a522
mov dword [ebp - 0xb0], 0xb4
mov dword [ebp - 0xac], 0x53
mov eax, dword [ebp + 8]
or eax, dword [ebp - 0x30]
mov dword [ebp - 0x10], eax
mov ecx, dword [0x41c0c0]
push ecx
mov edx, dword [ebp - 0xac]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0xb0]
push eax
call dword [sym.imp.KERNEL32.dll_TlsFree]
mov dword [ebp - 0x108], eax
mov ecx, dword [0x41c130]
add ecx, dword [0x41c0d4]
jne 0x40a54a
mov edx, dword [0x41c134]
imul edx, dword [0x41c0cc]
test edx, edx
jne 0x40a54a
mov dword [ebp - 0x48], 0
jmp 0x40a551
mov dword [ebp - 0x48], 1
cmp dword [ebp - 0x48], 0
jne 0x40a581
mov eax, dword [ebp - 0xc]
and eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x30]
or ecx, dword [ebp - 0x30]
cmp eax, ecx
jne 0x40a570
mov dword [ebp - 0x4c], 1
jmp 0x40a577
mov dword [ebp - 0x4c], 0
cmp dword [ebp - 0x4c], 0
je 0x40a6ab
mov dword [ebp - 4], 0xec
mov edx, dword [ebp - 0x10c]
imul edx, dword [0x41c0c0]
mov eax, dword [0x41c0d8]
or eax, dword [0x41c0d0]
cmp edx, eax
jae 0x40a5ad
mov dword [ebp - 0x50], 1
jmp 0x40a5b4
mov dword [ebp - 0x50], 0
cmp dword [ebp - 0x50], 0
jne 0x40a5ec
mov ecx, dword [ebp - 8]
xor ecx, dword [ebp - 8]
mov edx, dword [ebp - 0x24]
or edx, dword [0x41c124]
cmp ecx, edx
jne 0x40a5d6
mov dword [ebp - 0x54], 1
jmp 0x40a5dd
mov dword [ebp - 0x54], 0
cmp dword [ebp - 0x54], 0
jne 0x40a5ec
mov dword [ebp - 0x58], 0
jmp 0x40a5f3
mov dword [ebp - 0x58], 1
cmp dword [ebp - 0x58], 0
jne 0x40a621
mov eax, dword [ebp - 4]
xor edx, edx
div dword [ebp - 4]
mov ecx, dword [ebp - 4]
sub ecx, dword [ebp - 4]
cmp eax, ecx
jbe 0x40a614
mov dword [ebp - 0x5c], 1
jmp 0x40a61b
mov dword [ebp - 0x5c], 0
cmp dword [ebp - 0x5c], 0
je 0x40a654
mov dword [ebp - 0x110], 0
mov dword [ebp - 0x114], 0
mov dword [ebp - 0xb4], 0
mov dword [ebp - 0x60], 0
mov edx, dword [ebp - 0xb4]
or edx, dword [ebp - 0x60]
mov dword [ebp - 0x60], edx
jmp 0x40a697
mov dword [ebp - 0x118], 0x76
mov dword [ebp - 0x11c], 0xb5
mov eax, dword [ebp - 0x44]
or eax, dword [0x41c118]
mov dword [ebp - 0x10], eax
mov ecx, dword [0x41c0d0]
push ecx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 0x120], eax
mov edx, dword [0x41c134]
imul edx, dword [ebp - 0x1c]
mov dword [0x41c0cc], edx
mov eax, dword [ebp - 4]
or eax, dword [ebp - 4]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
and ecx, dword [ebp - 4]
mov dword [ebp - 4], ecx
jmp 0x40a6e4
mov dword [ebp - 0x124], 0x78
mov dword [ebp - 0x128], 2
mov edx, dword [ebp - 0x24]
add edx, dword [ebp - 0x1c]
mov dword [0x41c12c], edx
mov eax, dword [0x41c124]
sub eax, dword [ebp + 8]
mov dword [0x41c12c], eax
mov ecx, dword [ebp - 0xb8]
and ecx, dword [ebp - 8]
mov dword [ebp + 8], ecx
mov dword [ebp - 0x38], 0x2a
jmp 0x40a6f6
mov edx, dword [ebp - 0x38]
add edx, 1
mov dword [ebp - 0x38], edx
cmp dword [ebp - 0x38], 0x8d
jae 0x40a74f
mov dword [ebp - 0x12c], 0x4b
mov dword [ebp - 0x130], 0
mov dword [ebp - 0xbc], 0x96
mov dword [ebp - 0xc0], 0
mov dword [ebp - 0xc4], 0x62
mov dword [ebp - 0x134], 0
mov eax, dword [ebp - 0xbc]
sub eax, dword [ebp - 0xc0]
mov dword [ebp - 0xc4], eax
jmp 0x40a6ed
mov dword [ebp - 0x20], 0x2f
jmp 0x40a761
mov ecx, dword [ebp - 0x20]
add ecx, 1
mov dword [ebp - 0x20], ecx
cmp dword [ebp - 0x20], 0x39
jae 0x40aa0f
mov dword [ebp - 0x138], 0xce
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x84], 0
mov dword [ebp - 0x78], 0x8e
mov dword [ebp - 0xdc], 0xa0
mov edx, dword [ebp - 0x78]
add edx, dword [ebp - 0x2c]
mov dword [ebp - 0x40], edx
mov eax, dword [ebp - 0x40]
add eax, dword [0x41c0c0]
mov ecx, dword [ebp - 0x20]
add ecx, dword [0x41c0cc]
cmp eax, ecx
jae 0x40a7c6
mov dword [ebp - 0x64], 1
jmp 0x40a7cd
mov dword [ebp - 0x64], 0
cmp dword [ebp - 0x64], 0
je 0x40a80a
mov edx, dword [ebp + 8]
sub edx, dword [0x41c12c]
je 0x40a7f4
mov eax, dword [0x41c0c4]
or eax, dword [ebp - 0xf0]
je 0x40a7f4
mov dword [ebp - 0x68], 1
jmp 0x40a7fb
mov dword [ebp - 0x68], 0
cmp dword [ebp - 0x68], 0
je 0x40a80a
mov dword [ebp - 0x6c], 1
jmp 0x40a811
mov dword [ebp - 0x6c], 0
cmp dword [ebp - 0x6c], 0
je 0x40a84f
mov ecx, dword [0x41c0c8]
or ecx, dword [0x41c12c]
je 0x40a839
mov edx, dword [ebp - 0x13c]
sub edx, dword [ebp - 8]
je 0x40a839
mov dword [ebp - 0x70], 1
jmp 0x40a840
mov dword [ebp - 0x70], 0
cmp dword [ebp - 0x70], 0
je 0x40a84f
mov dword [ebp - 0x74], 1
jmp 0x40a856
mov dword [ebp - 0x74], 0
cmp dword [ebp - 0x74], 0
je 0x40a889
mov eax, dword [ebp - 0x2c]
sub eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x84]
xor ecx, dword [ebp - 0x78]
cmp eax, ecx
jne 0x40a878
mov dword [ebp - 0x7c], 1
jmp 0x40a87f
mov dword [ebp - 0x7c], 0
cmp dword [ebp - 0x7c], 0
jne 0x40a9fe
mov dword [ebp - 0x140], 0x34
mov dword [ebp - 0xc8], 0xa1
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x90], 0
mov dword [ebp - 0x3c], 0
mov edx, dword [ebp - 0x3c]
imul edx, dword [ebp - 0xc8]
mov dword [ebp - 0x3c], edx
mov eax, dword [ebp - 0x28]
and eax, dword [ebp - 0x28]
mov dword [ebp - 0x90], eax
mov ecx, dword [ebp - 0x14]
or ecx, dword [ebp - 0xcc]
jne 0x40a8ed
mov edx, dword [ebp - 0x24]
xor edx, dword [0x41c124]
jne 0x40a8ed
mov dword [ebp - 0x80], 0
jmp 0x40a8f4
mov dword [ebp - 0x80], 1
cmp dword [ebp - 0x80], 0
je 0x40a940
mov eax, dword [0x41c0d0]
add eax, dword [ebp - 0x84]
mov ecx, dword [0x41c128]
and ecx, dword [ebp - 0xec]
cmp eax, ecx
je 0x40a921
mov dword [ebp - 0x88], 1
jmp 0x40a92b
mov dword [ebp - 0x88], 0
cmp dword [ebp - 0x88], 0
je 0x40a940
mov dword [ebp - 0x8c], 1
jmp 0x40a94a
mov dword [ebp - 0x8c], 0
cmp dword [ebp - 0x8c], 0
je 0x40a99f
mov edx, dword [ebp - 0x3c]
xor edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x90]
imul eax, dword [ebp - 0x28]
cmp edx, eax
jae 0x40a973
mov dword [ebp - 0x94], 1
jmp 0x40a97d
mov dword [ebp - 0x94], 0
cmp dword [ebp - 0x94], 0
je 0x40a99f
mov ecx, dword [ebp - 0xcc]
push ecx
mov edx, dword [0x41c0d0]
push edx
call dword [sym.imp.GDI32.dll_SetArcDirection]
mov dword [ebp - 0x14], eax
jmp 0x40a9f9
mov dword [ebp - 0xd8], 0
mov dword [ebp - 0x144], 0xb4
mov dword [ebp - 0x148], 0
mov dword [ebp - 0x14c], 0
mov dword [ebp - 0xd0], 0xc8
mov dword [ebp - 0x150], 0xfb
mov dword [ebp - 0xd4], 0
mov eax, dword [ebp - 0xd0]
sub eax, dword [ebp - 0xd4]
mov dword [ebp - 0xd8], eax
jmp 0x40a9fe
jmp 0x40a7a7
mov ecx, dword [ebp - 0xdc]
or ecx, dword [ebp - 0x40]
mov dword [ebp - 0x2c], ecx
jmp 0x40a758
mov edx, dword [ebp - 0x30]
mov dword [ebp - 0x18], edx
cmp dword [ebp - 0x18], 0xa3
ja 0x40aa3c
cmp dword [ebp - 0x18], 0xa3
je 0x40aa8d
cmp dword [ebp - 0x18], 0
je 0x40aa4e
cmp dword [ebp - 0x18], 0x51
je 0x40ab2e
jmp 0x40ab56
cmp dword [ebp - 0x18], 0xff
je 0x40aae6
jmp 0x40ab56
mov dword [ebp - 0x154], 0xbf
mov dword [ebp - 0xe8], 0
mov dword [ebp - 0xe0], 0x6c
mov dword [ebp - 0xe4], 0
mov eax, dword [ebp - 0xe0]
sub eax, dword [ebp - 0xe4]
mov dword [ebp - 0xe8], eax
jmp 0x40ab68
mov dword [ebp - 0x158], 0xe3
mov ecx, dword [0x41c124]
and ecx, dword [0x41c118]
mov dword [0x41c0c0], ecx
mov edx, dword [0x41c0bc]
or edx, dword [0x41c0c0]
mov dword [0x41c0c4], edx
mov eax, dword [0x41c0d8]
push eax
mov ecx, dword [0x41c0d4]
push ecx
mov edx, dword [0x41c0c0]
push edx
mov eax, dword [ebp - 0xec]
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [0x41c120], eax
jmp 0x40ab68
mov dword [ebp - 0x15c], 0x4d
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x41c0c4], eax
mov ecx, dword [ebp - 0x98]
sub ecx, dword [0x41c0d0]
mov dword [0x41c118], ecx
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp - 0xf0]
push ecx
mov edx, dword [0x41c120]
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x44], eax
jmp 0x40ab68
mov dword [ebp - 0x160], 0xd3
mov dword [ebp - 0xf4], 0xfb
mov eax, dword [ebp - 0x98]
sub eax, dword [str.p4vH_]
mov dword [ebp - 0xf4], eax
jmp 0x40ab68
mov ecx, dword [ebp - 0x164]
push ecx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [0x41c0cc], eax
mov edx, dword [ebp - 0xc]
add edx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0xc]
or eax, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret