Function at 0x401000
Capabilities:
Get common file path
Query environment variable
Set environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4049b0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
sub esp, 0x95c
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x1c], closesocket
mov dword [ebp - 0x18], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x47c], 0
mov dword [ebp - 0x6cc], 0
mov dword [ebp - 0x30], 0
mov byte [ebp - 0x6d4], 0
xor eax, eax
mov dword [ebp - 0x6d3], eax
mov dword [ebp - 0x2c], 0x1fe
mov byte [ebp - 0x6c8], 0
mov ecx, 0x91
xor eax, eax
lea edi, [ebp - 0x6c7]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0
push 0x42ebd4
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0x157
lea ecx, [ebp - 0x944]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
movsx edx, byte [0x42f664]
test edx, edx
je 0x401232
push 0x42f664
lea eax, [ebp - 0x7ec]
push eax
call fcn.00401750
add esp, 8
push 0x2a
lea ecx, [ebp - 0x7ec]
push ecx
call fcn.004025f0
add esp, 8
test eax, eax
je 0x401113
push 0x42ebc4
push 0x42ebc0
lea edx, [ebp - 0x7ec]
push edx
call fcn.004039a0
add esp, 0xc
jmp 0x401127
push 0x42ebb0
lea eax, [ebp - 0x7ec]
push eax
call fcn.00402630
add esp, 8
push 0x247
lea ecx, [ebp - 0x6c8]
push ecx
lea edx, [ebp - 0x7ec]
push edx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
push 0x3f
lea eax, [ebp - 0x6c8]
push eax
call fcn.004025f0
add esp, 8
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
je 0x401172
push 1
mov ecx, dword [ebp - 0x24]
push ecx
call fcn.00403400
add esp, 8
push 4
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x401140
lea edx, [ebp - 0x6c8]
push edx
call fcn.00401f80
add esp, 4
mov dword [ebp - 0x950], eax
mov eax, dword [ebp - 0x950]
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 0x24]
lea edx, [ebp - 0x6c8]
cmp ecx, edx
je 0x4011fe
mov eax, dword [ebp - 0x24]
push eax
lea ecx, [ebp - 0x600]
push ecx
call fcn.00401750
add esp, 8
lea edx, [ebp - 0x6c8]
push edx
call fcn.004030e0
add esp, 4
mov byte [ebp - 0x954], al
mov eax, dword [ebp - 0x954]
and eax, 0xff
test eax, eax
jne 0x4011ec
lea ecx, [ebp - 0x944]
push ecx
lea edx, [ebp - 0x6c8]
push edx
call fcn.00401750
add esp, 8
jmp 0x4011f3
mov eax, dword [ebp - 0x24]
mov byte [eax - 1], 0
lea ecx, [ebp - 0x600]
mov dword [ebp - 0x24], ecx
jmp 0x401230
lea edx, [ebp - 0x600]
mov dword [ebp - 0x24], edx
lea eax, [ebp - 0x6c8]
push eax
mov ecx, dword [ebp - 0x24]
push ecx
call fcn.00401750
add esp, 8
lea edx, [ebp - 0x944]
push edx
lea eax, [ebp - 0x6c8]
push eax
call fcn.00401750
add esp, 8
jmp 0x401257
lea ecx, [ebp - 0x600]
mov dword [ebp - 0x24], ecx
mov edx, dword [ebp - 0x24]
mov byte [edx], 0
lea eax, [ebp - 0x944]
push eax
lea ecx, [ebp - 0x6c8]
push ecx
call fcn.00401750
add esp, 8
mov edx, dword [ebp - 0x24]
movsx eax, byte [edx]
test eax, eax
jne 0x401283
push 0xa
mov ecx, dword [ebp - 0x24]
push ecx
call fcn.00403400
add esp, 8
push 0x42eba8
mov edx, dword [ebp - 0x24]
add edx, 5
push edx
call fcn.00401750
add esp, 8
mov eax, dword [ebp - 0x24]
push eax
lea ecx, [ebp - 0x6c8]
push ecx
push 0x42eba0
lea edx, [ebp - 0x7ec]
push edx
call dword [0x42ece0]
add esp, 0x10
mov eax, dword [ebp + 0xc]
push eax
call fcn.00402680
add esp, 4
lea ecx, [ebp - 0x7ec]
push ecx
call fcn.00401fd0
add esp, 4
lea edx, [ebp - 0x7ec]
push edx
call fcn.00402570
add esp, 4
mov byte [ebp - 0x958], al
mov eax, dword [ebp - 0x958]
and eax, 0xff
test eax, eax
je 0x4012fb
push 0
lea ecx, [ebp - 0x7ec]
push ecx
call fcn.004025f0
add esp, 8
mov dword [eax], 0x6c
jmp 0x4012be
lea edx, [ebp - 0x1c]
push edx
push 1
push 0
mov eax, dword [0x42e954]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [0x42ec64]
mov dword [ebp - 0x47c], eax
lea edx, [ebp - 0x2c]
push edx
lea eax, [ebp - 0x478]
push eax
lea ecx, [ebp - 0x480]
push ecx
push 0
push 0x42eb7c
mov edx, dword [ebp - 0x1c]
push edx
call dword [0x42ec70]
mov dword [ebp - 0x47c], eax
mov eax, dword [ebp - 0x1c]
push eax
call dword [0x42ec44]
cmp dword [ebp - 0x47c], 0
je 0x40135a
jmp 0x40141a
call fcn.00402de0
mov dword [ebp - 0x95c], eax
cmp dword [ebp - 0x95c], 0
jne 0x4013dc
lea ecx, [ebp - 0x7ec]
push ecx
push 4
lea edx, [ebp - 0x478]
push edx
call fcn.004017b0
add esp, 0xc
mov byte [ebp - 0x960], al
mov eax, dword [ebp - 0x960]
and eax, 0xff
test eax, eax
je 0x4013a5
mov eax, 1
jmp 0x4014aa
lea ecx, [ebp - 0x7ec]
push ecx
push 3
lea edx, [ebp - 0x478]
push edx
call fcn.004017b0
add esp, 0xc
mov byte [ebp - 0x964], al
mov eax, dword [ebp - 0x964]
and eax, 0xff
test eax, eax
je 0x4013dc
mov eax, 1
jmp 0x4014aa
lea ecx, [ebp - 0x7ec]
push ecx
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
lea ecx, [ebp - 0x478]
push ecx
call fcn.00402000
add esp, 0x10
mov byte [ebp - 0x968], al
mov edx, dword [ebp - 0x968]
and edx, 0xff
test edx, edx
je 0x40141a
mov eax, 1
jmp 0x4014aa
mov eax, dword [ebp + 8]
push eax
call fcn.00402680
add esp, 4
mov dword [ebp - 0x948], 0x110
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x34], ecx
mov edx, dword [ebp - 0x34]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.004014c0
add esp, 8
push 0x42f71c
mov ecx, dword [ebp - 0x948]
push ecx
mov edx, dword [ebp - 0x34]
push edx
lea eax, [ebp - 0x7ec]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.00403440
add esp, 0x1c
mov dword [ebp - 0x96c], eax
mov ecx, dword [ebp - 0x96c]
mov dword [ebp - 0x14], ecx
jmp 0x401488
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x14], 0
je 0x4014a8
mov edx, dword [ebp - 0x14]
push edx
call fcn.00401cc0
add esp, 4
and eax, 0xff
jmp 0x4014aa
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret