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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4049c0
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 0x42ebcc
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 0x401fd2
push 0x42f664
lea eax, [ebp - 0x7ec]
push eax
call fcn.00403350
add esp, 8
push 0x2a
lea ecx, [ebp - 0x7ec]
push ecx
call fcn.00402d40
add esp, 8
test eax, eax
je 0x401eb3
push 0x42ebbc
push 0x42ebb8
lea edx, [ebp - 0x7ec]
push edx
call fcn.004039b0
add esp, 0xc
jmp 0x401ec7
push 0x42eba8
lea eax, [ebp - 0x7ec]
push eax
call fcn.00402fe0
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.00402d40
add esp, 8
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
je 0x401f12
push 1
mov ecx, dword [ebp - 0x24]
push ecx
call fcn.00402bf0
add esp, 8
push 4
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x401ee0
lea edx, [ebp - 0x6c8]
push edx
call fcn.00401010
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 0x401f9e
mov eax, dword [ebp - 0x24]
push eax
lea ecx, [ebp - 0x600]
push ecx
call fcn.00403350
add esp, 8
lea edx, [ebp - 0x6c8]
push edx
call fcn.00403190
add esp, 4
mov byte [ebp - 0x954], al
mov eax, dword [ebp - 0x954]
and eax, 0xff
test eax, eax
jne 0x401f8c
lea ecx, [ebp - 0x944]
push ecx
lea edx, [ebp - 0x6c8]
push edx
call fcn.00403350
add esp, 8
jmp 0x401f93
mov eax, dword [ebp - 0x24]
mov byte [eax - 1], 0
lea ecx, [ebp - 0x600]
mov dword [ebp - 0x24], ecx
jmp 0x401fd0
lea edx, [ebp - 0x600]
mov dword [ebp - 0x24], edx
lea eax, [ebp - 0x6c8]
push eax
mov ecx, dword [ebp - 0x24]
push ecx
call fcn.00403350
add esp, 8
lea edx, [ebp - 0x944]
push edx
lea eax, [ebp - 0x6c8]
push eax
call fcn.00403350
add esp, 8
jmp 0x401ff7
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.00403350
add esp, 8
mov edx, dword [ebp - 0x24]
movsx eax, byte [edx]
test eax, eax
jne 0x402023
push 0xa
mov ecx, dword [ebp - 0x24]
push ecx
call fcn.00402bf0
add esp, 8
push 0x42eba0
mov edx, dword [ebp - 0x24]
add edx, 5
push edx
call fcn.00403350
add esp, 8
mov eax, dword [ebp - 0x24]
push eax
lea ecx, [ebp - 0x6c8]
push ecx
push 0x42eb98
lea edx, [ebp - 0x7ec]
push edx
call dword [0x42ecdc]
add esp, 0x10
mov eax, dword [ebp + 0xc]
push eax
call fcn.004030b0
add esp, 4
lea ecx, [ebp - 0x7ec]
push ecx
call fcn.00403410
add esp, 4
lea edx, [ebp - 0x7ec]
push edx
call fcn.00402d20
add esp, 4
mov byte [ebp - 0x958], al
mov eax, dword [ebp - 0x958]
and eax, 0xff
test eax, eax
je 0x40209b
push 0
lea ecx, [ebp - 0x7ec]
push ecx
call fcn.00402d40
add esp, 8
mov dword [eax], 0x6c
jmp 0x40205e
lea edx, [ebp - 0x1c]
push edx
push 1
push 0
mov eax, dword [0x42e948]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [0x42ec4c]
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 0x42eb70
mov edx, dword [ebp - 0x1c]
push edx
call dword [0x42ec58]
mov dword [ebp - 0x47c], eax
mov eax, dword [ebp - 0x1c]
push eax
call dword [0x42ec2c]
cmp dword [ebp - 0x47c], 0
je 0x4020fa
jmp 0x4021ba
call fcn.00402ba0
mov dword [ebp - 0x95c], eax
cmp dword [ebp - 0x95c], 0
jne 0x40217c
lea ecx, [ebp - 0x7ec]
push ecx
push 4
lea edx, [ebp - 0x478]
push edx
call fcn.00402260
add esp, 0xc
mov byte [ebp - 0x960], al
mov eax, dword [ebp - 0x960]
and eax, 0xff
test eax, eax
je 0x402145
mov eax, 1
jmp 0x40224a
lea ecx, [ebp - 0x7ec]
push ecx
push 3
lea edx, [ebp - 0x478]
push edx
call fcn.00402260
add esp, 0xc
mov byte [ebp - 0x964], al
mov eax, dword [ebp - 0x964]
and eax, 0xff
test eax, eax
je 0x40217c
mov eax, 1
jmp 0x40224a
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.004027b0
add esp, 0x10
mov byte [ebp - 0x968], al
mov edx, dword [ebp - 0x968]
and edx, 0xff
test edx, edx
je 0x4021ba
mov eax, 1
jmp 0x40224a
mov eax, dword [ebp + 8]
push eax
call fcn.004030b0
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.00401300
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.00403510
add esp, 0x1c
mov dword [ebp - 0x96c], eax
mov ecx, dword [ebp - 0x96c]
mov dword [ebp - 0x14], ecx
jmp 0x402228
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x14], 0
je 0x402248
mov edx, dword [ebp - 0x14]
push edx
call fcn.00402540
add esp, 4
and eax, 0xff
jmp 0x40224a
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