Function at 0x401000
Capabilities:
Allocate thread local storage
Query environment variable

Disassembly:
push 0x524
push 0
push 0x2d8ae4c
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0
call sub.KERNEL32.dll_GetModuleHandleW
mov dword [0x2d8ae50], eax
push 0
push 0x1000
push 0
call sub.KERNEL32.dll_HeapCreate
mov dword [0x2d8ae4c], eax
mov eax, 0x46e2cc
mov dword [0x2d8ae60], eax
call fcn.0041d780
call fcn.0041cc44
call fcn.0041c750
call fcn.0041af20
call fcn.00418e5c
call fcn.00418700
call fcn.00417ce5
call fcn.00416c4e
call fcn.00416570
call fcn.0041620b
call fcn.00415f86
call fcn.00412dd5
call fcn.0041277d
call fcn.004114e0
call fcn.00410810
call fcn.0040f427
call fcn.0040c943
call fcn.0040be0c
call fcn.0040b3d4
call fcn.0040aa2f
call fcn.0040a14f
call fcn.00409d7b
call fcn.00409c83
mov edx, 0x46cc8a
lea ecx, [0x2d8ae80]
call fcn.00409008
mov dword [0x2d8ae54], 0
push edx
call main
pop edx
push eax
push edx
call main
pop edx
push eax
push edx
call main
pop edx
push eax
push edx
call main
pop edx
push eax
call fcn.0040a17e
call fcn.00409572
add dword [esp], edx
call fcn.0041099c
lea eax, [0x2d8ae78]
push eax
call fcn.0041d810
mov edx, 0x46b028
lea ecx, [0x2d8ae7c]
call fcn.00409008
push edx
call main
pop edx
push eax
push edx
call main
pop edx
push eax
push 0x3e8
call fcn.0041b1d0
lea eax, [0x2d8ae5c]
push eax
call fcn.0041d810
push 0x3e8
mov eax, dword [0x2d8ae5c]
push eax
mov eax, 0x46d040
push eax
call sub.KERNEL32.dll_GetEnvironmentVariableW
push edx
call main
pop edx
push eax
mov edx, dword [0x2d8ae5c]
push edx
call main
pop edx
push eax
push edx
call fcn.0041d8a0
mov edx, 0x46dd90
push edx
call fcn.0041d8a0
call fcn.00409572
add dword [esp], edx
call fcn.00410a1b
call fcn.00409590
push edx
push eax
pop ebx
pop edi
cmp edi, 0
jg 0x4011ad
jl 0x4011a9
cmp ebx, 0
ja 0x4011ad
xor eax, eax
jmp 0x4011b2
mov eax, 1
or eax, eax
je 0x4011e3
mov edx, dword [0x2d8ae5c]
push edx
call main
pop edx
push eax
push edx
call fcn.0041d8a0
mov edx, 0x46b898
push edx
call fcn.0041d8a0
lea eax, [0x2d8ae7c]
push eax
call fcn.0041d810
jmp 0x40120e
mov edx, dword [0x2d8ae5c]
push edx
call main
pop edx
push eax
push edx
call fcn.0041d8a0
mov edx, 0x46c718
push edx
call fcn.0041d8a0
lea eax, [0x2d8ae7c]
push eax
call fcn.0041d810
push 0xb
mov eax, 0x46b368
push eax
push 0
call fcn.0041cd5a
push 8
mov eax, 0x46b368
push eax
push 1
call fcn.0041cd5a
push edx
call main
pop edx
push eax
push edx
call main
pop edx
push eax
push edx
call main
pop edx
push eax
call fcn.00410b72
call fcn.0041d900
push edx
call main
pop edx
push eax
push edx
call main
pop edx
push eax
push edx
call main
pop edx
push eax
push edx
call main
pop edx
push eax
call fcn.0040a17e
call fcn.00409572
add dword [esp], edx
call fcn.0041099c
call fcn.00409572
add dword [esp], edx
call fcn.00409572
add dword [esp + 4], edx
call fcn.0041b2e0
call fcn.00409590
mov ebx, eax
and ebx, ebx
jg 0x401307
push edx
call main
pop edx
push eax
mov eax, 0x46b228
push eax
push edx
call main
pop edx
push eax
push edx
call main
pop edx
push eax
push edx
call main
pop edx
push eax
push edx
call main
pop edx
push eax
call fcn.0040a17e
call fcn.00409572
add dword [esp], edx
call fcn.0041099c
call fcn.00409572
add dword [esp], edx
call fcn.0041b2e0
call fcn.00409590
mov ebx, eax
and ebx, ebx
jg 0x401307
jmp 0x40130e
mov eax, 1
jmp 0x401310
xor eax, eax
and eax, eax
jne 0x40136e
push edx
call main
pop edx
push eax
mov eax, 0x46b22c
push eax
push edx
call main
pop edx
push eax
push edx
call main
pop edx
push eax
push edx
call main
pop edx
push eax
push edx
call main
pop edx
push eax
call fcn.0040a17e
call fcn.00409572
add dword [esp], edx
call fcn.0041099c
call fcn.00409572
add dword [esp], edx
call fcn.0041b2e0
call fcn.00409590
mov ebx, eax
and ebx, ebx
jg 0x40136e
jmp 0x401375
mov eax, 1
jmp 0x401377
xor eax, eax
and eax, eax
jne 0x4013d5
push edx
call main
pop edx
push eax
mov eax, 0x46b214
push eax
push edx
call main
pop edx
push eax
push edx
call main
pop edx
push eax
push edx
call main
pop edx
push eax
push edx
call main
pop edx
push eax
call fcn.0040a17e
call fcn.00409572
add dword [esp], edx
call fcn.0041099c
call fcn.00409572
add dword [esp], edx
call fcn.0041b2e0
call fcn.00409590
mov ebx, eax
and ebx, ebx
jg 0x4013d5
jmp 0x4013dc
mov eax, 1
jmp 0x4013de
xor eax, eax
and eax, eax
jne 0x40143c
push edx
call main
pop edx
push eax
mov eax, 0x46b32e
push eax
push edx
call main
pop edx
push eax
push edx
call main
pop edx
push eax
push edx
call main
pop edx
push eax
push edx
call main
pop edx
push eax
call fcn.0040a17e
call fcn.00409572
add dword [esp], edx
call fcn.0041099c
call fcn.00409572
add dword [esp], edx
call fcn.0041b2e0
call fcn.00409590
mov ebx, eax
and ebx, ebx
jg 0x40143c
jmp 0x401443
mov eax, 1
jmp 0x401445
xor eax, eax
and eax, eax
jne 0x4014a3
push edx
call main
pop edx
push eax
mov eax, 0x46b67e
push eax
push edx
call main
pop edx
push eax
push edx
call main
pop edx
push eax
push edx
call main
pop edx
push eax
push edx
call main
pop edx
push eax
call fcn.0040a17e
call fcn.00409572
add dword [esp], edx
call fcn.0041099c
call fcn.00409572
add dword [esp], edx
call fcn.0041b2e0
call fcn.00409590
mov ebx, eax
and ebx, ebx
jg 0x4014a3
jmp 0x4014aa
mov eax, 1
jmp 0x4014ac
xor eax, eax
and eax, eax
jne 0x40150a
push edx
call main
pop edx
push eax
mov eax, 0x46b6b0
push eax
push edx
call main
pop edx
push eax
push edx
call main
pop edx
push eax
push edx
call main
pop edx
push eax
push edx
call main
pop edx
push eax
call fcn.0040a17e
call fcn.00409572
add dword [esp], edx
call fcn.0041099c
call fcn.00409572
add dword [esp], edx
call fcn.0041b2e0
call fcn.00409590
mov ebx, eax
and ebx, ebx
jg 0x40150a
jmp 0x401511
mov eax, 1
jmp 0x401513
xor eax, eax
and eax, eax
jne 0x401571
push edx
call main
pop edx
push eax
mov eax, 0x46b50c
push eax
push edx
call main
pop edx
push eax
push edx
call main
pop edx
push eax
push edx
call main
pop edx
push eax
push edx
call main
pop edx
push eax
call fcn.0040a17e
call fcn.00409572
add dword [esp], edx
call fcn.0041099c
call fcn.00409572
add dword [esp], edx
call fcn.0041b2e0
call fcn.00409590
mov ebx, eax
and ebx, ebx
jg 0x401571
jmp 0x401578
mov eax, 1
jmp 0x40157a
xor eax, eax
and eax, eax
jne 0x4015d8
push edx
call main
pop edx
push eax
mov eax, 0x46b544
push eax
push edx
call main
pop edx
push eax
push edx
call main
pop edx
push eax
push edx
call main
pop edx
push eax
push edx
call main
pop edx
push eax
call fcn.0040a17e
call fcn.00409572
add dword [esp], edx
call fcn.0041099c
call fcn.00409572
add dword [esp], edx
call fcn.0041b2e0
call fcn.00409590
mov ebx, eax
and ebx, ebx
jg 0x4015d8
jmp 0x4015df
mov eax, 1
jmp 0x4015e1
xor eax, eax
and eax, eax
jne 0x40163f
push edx
call main
pop edx
push eax
mov eax, 0x46b1e0
push eax
push edx
call main
pop edx
push eax
push edx
call main
pop edx
push eax
push edx
call main
pop edx
push eax
push edx
call main
pop edx
push eax
call fcn.0040a17e
call fcn.00409572
add dword [esp], edx
call fcn.0041099c
call fcn.00409572
add dword [esp], edx
call fcn.0041b2e0
call fcn.00409590
mov ebx, eax
and ebx, ebx
jg 0x40163f
jmp 0x401646
mov eax, 1
jmp 0x401648
xor eax, eax
and eax, eax
jne 0x4016a6
push edx
call main
pop edx
push eax
mov eax, 0x46b20c
push eax
push edx
call main
pop edx
push eax
push edx
call main
pop edx
push eax
push edx
call main
pop edx
push eax
push edx
call main
pop edx
push eax
call fcn.0040a17e
call fcn.00409572
add dword [esp], edx
call fcn.0041099c
call fcn.00409572
add dword [esp], edx
call fcn.0041b2e0
call fcn.00409590
mov ebx, eax
and ebx, ebx
jg 0x4016a6
jmp 0x4016ad
mov eax, 1
jmp 0x4016af
xor eax, eax
and eax, eax
je 0x40173a
push edx
call main
pop edx
push eax
push edx
call main
pop edx
push eax
push edx
call main
pop edx
push eax
push edx
call main
pop edx
push eax
call fcn.0040a17e
call fcn.00409572
add dword [esp], edx
call fcn.0041099c
lea eax, [0x2d8ae6c]
push eax
call fcn.0041d810
push edx
call main
pop edx
push eax
push edx
call main
pop edx
push eax
push dword [0x2d8ae6c]
mov eax, 0x46d196
push eax
call fcn.00409df8
lea eax, [0x2d8ae78]
push eax
call fcn.0041d810
push dword [0x2d8ae78]
mov edx, 0x46b028
pop ecx
call fcn.004095a0
je 0x40173a
jmp 0x401c04
mov eax, 0x46b228
push eax
push dword [0x2d8ae78]
call fcn.0041b2e0
mov ebx, eax
and ebx, ebx
jg 0x40176a
mov eax, 0x46b22c
push eax
push dword [0x2d8ae78]
call fcn.0041b2e0
mov ebx, eax
and ebx, ebx
jg 0x40176a
jmp 0x401771
mov eax, 1
jmp 0x401773
xor eax, eax
and eax, eax
jne 0x401790
mov eax, 0x46b214
push eax
push dword [0x2d8ae78]
call fcn.0041b2e0
mov ebx, eax
and ebx, ebx
jg 0x401790
jmp 0x401797
mov eax, 1
jmp 0x401799
xor eax, eax
and eax, eax
jne 0x4017b6
mov eax, 0x46b32e
push eax
push dword [0x2d8ae78]
call fcn.0041b2e0
mov ebx, eax
and ebx, ebx
jg 0x4017b6
jmp 0x4017bd
mov eax, 1
jmp 0x4017bf
xor eax, eax
and eax, eax
jne 0x4017dc
mov eax, 0x46b67e
push eax
push dword [0x2d8ae78]
call fcn.0041b2e0
mov ebx, eax
and ebx, ebx
jg 0x4017dc
jmp 0x4017e3
mov eax, 1
jmp 0x4017e5
xor eax, eax
and eax, eax
jne 0x401802
mov eax, 0x46b6b0
push eax
push dword [0x2d8ae78]
call fcn.0041b2e0
mov ebx, eax
and ebx, ebx
jg 0x401802
jmp 0x401809
mov eax, 1
jmp 0x40180b
xor eax, eax
and eax, eax
jne 0x401828
mov eax, 0x46b50c
push eax
push dword [0x2d8ae78]
call fcn.0041b2e0
mov ebx, eax
and ebx, ebx
jg 0x401828
jmp 0x40182f
mov eax, 1
jmp 0x401831
xor eax, eax
and eax, eax
jne 0x40184e
mov eax, 0x46b544
push eax
push dword [0x2d8ae78]
call fcn.0041b2e0
mov ebx, eax
and ebx, ebx
jg 0x40184e
jmp 0x401855
mov eax, 1
jmp 0x401857
xor eax, eax
and eax, eax
jne 0x401874
mov eax, 0x46b1e0
push eax
push dword [0x2d8ae78]
call fcn.0041b2e0
mov ebx, eax
and ebx, ebx
jg 0x401874
jmp 0x40187b
mov eax, 1
jmp 0x40187d
xor eax, eax
and eax, eax
jne 0x40189a
mov eax, 0x46b20c
push eax
push dword [0x2d8ae78]
call fcn.0041b2e0
mov ebx, eax
and ebx, ebx
jg 0x40189a
jmp 0x4018a1
mov eax, 1
jmp 0x4018a3
xor eax, eax
and eax, eax
je 0x4018ac
jmp 0x401238
push 0x5a
push 0x18e
push 0
push 0
call fcn.00401c74
push 1
push 3
call fcn.0040c9e9
push 1
push 4
call fcn.0040c9e9
push 0xffffffff
push 1
call fcn.0040ca27
push 0xa
push 1
push 0x40a
push 1
call fcn.0040ca5f
push eax
call sub.USER32.dll_SendMessageW
call fcn.0040f145
mov ebx, eax
cmp ebx, 0x50
jle 0x401b1d
push edx
call main
pop edx
push eax
mov edx, dword [0x2d8ae78]
push edx
call main
pop edx
push eax
push edx
call fcn.0041d8a0
mov edx, 0x46c8c2
push edx
call fcn.0041d8a0
call fcn.00409572
add dword [esp], edx
call fcn.00410a1b
call fcn.00409590
push edx
push eax
pop ebx
pop edi
cmp edi, 0
jg 0x40196e
jl 0x40196a
cmp ebx, 0
ja 0x40196e
xor eax, eax
jmp 0x401973
mov eax, 1
or eax, eax
je 0x401b1d
push edx
call main
pop edx
push eax
mov edx, dword [0x2d8ae78]
push edx
call main
pop edx
push eax
push edx
call fcn.0041d8a0
mov edx, 0x46c8c2
push edx
call fcn.0041d8a0
call fcn.0041d900
push 0
call fcn.00409572
add dword [esp + 4], edx
call fcn.004117e0
call fcn.00409590
and eax, eax
je 0x401b1d
mov edx, 0x46b028
lea ecx, [0x2d8ae74]
call fcn.00409008
push 0
call fcn.00411960
mov dword [0x2d8ae64], eax
push 0
call fcn.004119b0
mov ebx, eax
and ebx, ebx
jne 0x401a8f
push edx
call main
pop edx
push eax
push edx
call main
pop edx
push eax
push 0
call fcn.00411b60
mov edx, 0x46d9b0
push edx
call fcn.0041d8a0
lea eax, [0x2d8ae58]
push eax
call fcn.0041d810
mov eax, 0x46bb3c
push eax
push dword [0x2d8ae58]
call fcn.0041b2e0
mov ebx, eax
and ebx, ebx
jle 0x401a8a
mov edx, dword [0x2d8ae74]
push edx
call main
pop edx
push eax
push edx
call fcn.0041d8a0
push edx
call main
pop edx
push eax
push edx
call main
pop edx
push eax
mov eax, 0x46b028
push eax
mov eax, 0x46b81c
push eax
push dword [0x2d8ae58]
call fcn.0041b640
pop eax
lea eax, [0x2d8ae74]
push eax
call fcn.0041d810
jmp 0x4019e6
push 0
call fcn.00411410
push dword [0x2d8ae74]
mov edx, 0x46b028
pop ecx
call fcn.004095a0
jne 0x401b1d
push edx
call main
pop edx
push eax
push 2
mov eax, 0x46b028
push eax
push edx
call main
pop edx
push eax
mov edx, 0x46cf1e
push edx
call fcn.0041d8a0
mov edx, dword [0x2d8ae74]
push edx
call fcn.0041d8a0
call fcn.0041d900
mov edx, dword [0x2d8ae7c]
push edx
call main
pop edx
push eax
push edx
call fcn.0041d8a0
mov edx, 0x46d522
push edx
call fcn.0041d8a0
call fcn.00409572
add dword [esp], edx
call fcn.00409572
add dword [esp + 4], edx
call fcn.0040a21d
call fcn.00409590
push 0
lea eax, [0x401eac]
push eax
call fcn.00409cdb
mov dword [0x2d8ae54], eax
call fcn.0040f492
mov dword [0x2d8ae70], eax
push dword [0x2d8ae70]
call fcn.0040200a
mov ebx, dword [0x2d8ae54]
and ebx, ebx
jne 0x401bf2
push dword [0x2d8ae78]
mov edx, 0x46b028
pop ecx
call fcn.004095a0
je 0x401bde
push 0
push 3
call fcn.0040c9e9
push 0
push 4
call fcn.0040c9e9
push 1
push 1
call fcn.0040c9e9
push 1
push 2
call fcn.0040c9e9
push 0xffff0001
push 0
call fcn.0040f4e1
mov ebx, eax
add ebx, 0xffffffd8
push ebx
push 0xffff0001
push 0x14
push 0
call fcn.0040cba2
mov eax, 0x46bbc2
push eax
push 0
call fcn.0040cbdb
push 3
call fcn.0040cc26
mov dword [0x2d8ae54], 0xff
mov ebx, dword [0x2d8ae70]
cmp ebx, 0x333c
jne 0x401b33
push 0
call 0x401c23
call fcn.0041d7b0
push dword [0x2d8ae4c]
call sub.KERNEL32.dll_HeapDestroy
call sub.KERNEL32.dll_ExitProcess
call fcn.00409c41
call fcn.0040aa1d
call fcn.0040b3a4
call fcn.0040be00
call fcn.0040c8ed
call fcn.0040f404
call fcn.004107ff
call fcn.00410bd5
call fcn.004114d0
call fcn.0041275f
call fcn.00416564
call fcn.00417cd8
call fcn.0041af40
call fcn.0041cdb1
call fcn.0041ce17
call fcn.0041c740
ret