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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x404770
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
sub esp, 0x968
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 - 0x6d0], 0
mov dword [ebp - 0x30], 0
mov byte [ebp - 0x6d8], 0
xor eax, eax
mov dword [ebp - 0x6d7], eax
mov dword [ebp - 0x2c], 0x1fe
mov byte [ebp - 0x6cc], 0
mov ecx, 0x92
xor eax, eax
lea edi, [ebp - 0x6cb]
rep stosd dword es:[edi], eax
push 0
push 0x42eb4c
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
push 0x159
lea ecx, [ebp - 0x950]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
movsx edx, byte [0x42f204]
test edx, edx
je 0x40241e
push 0x42f204
lea eax, [ebp - 0x7f4]
push eax
call fcn.00403dc0
add esp, 8
push 0x2a
lea ecx, [ebp - 0x7f4]
push ecx
call fcn.00403ed0
add esp, 8
test eax, eax
je 0x4022f1
push 0x42eb3c
push 0x42eb38
lea edx, [ebp - 0x7f4]
push edx
call fcn.00403c60
add esp, 0xc
jmp 0x402305
push 0x42eb28
lea eax, [ebp - 0x7f4]
push eax
call fcn.00403f10
add esp, 8
push 0x249
lea ecx, [ebp - 0x6cc]
push ecx
lea edx, [ebp - 0x7f4]
push edx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
push 0x3f
lea eax, [ebp - 0x6cc]
push eax
call fcn.00403ed0
add esp, 8
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
je 0x40235e
push 1
mov ecx, dword [ebp - 0x24]
push ecx
call fcn.004021b0
add esp, 8
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor edx, edx
mov ecx, 6
div ecx
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x40231e
lea edx, [ebp - 0x6cc]
push edx
call fcn.00401c10
add esp, 4
mov dword [ebp - 0x95c], eax
mov eax, dword [ebp - 0x95c]
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 0x24]
lea edx, [ebp - 0x6cc]
cmp ecx, edx
je 0x4023ea
mov eax, dword [ebp - 0x24]
push eax
lea ecx, [ebp - 0x604]
push ecx
call fcn.00403dc0
add esp, 8
lea edx, [ebp - 0x6cc]
push edx
call fcn.00401010
add esp, 4
mov byte [ebp - 0x960], al
mov eax, dword [ebp - 0x960]
and eax, 0xff
test eax, eax
jne 0x4023d8
lea ecx, [ebp - 0x950]
push ecx
lea edx, [ebp - 0x6cc]
push edx
call fcn.00403dc0
add esp, 8
jmp 0x4023df
mov eax, dword [ebp - 0x24]
mov byte [eax - 1], 0
lea ecx, [ebp - 0x604]
mov dword [ebp - 0x24], ecx
jmp 0x40241c
lea edx, [ebp - 0x604]
mov dword [ebp - 0x24], edx
lea eax, [ebp - 0x6cc]
push eax
mov ecx, dword [ebp - 0x24]
push ecx
call fcn.00403dc0
add esp, 8
lea edx, [ebp - 0x950]
push edx
lea eax, [ebp - 0x6cc]
push eax
call fcn.00403dc0
add esp, 8
jmp 0x402443
lea ecx, [ebp - 0x604]
mov dword [ebp - 0x24], ecx
mov edx, dword [ebp - 0x24]
mov byte [edx], 0
lea eax, [ebp - 0x950]
push eax
lea ecx, [ebp - 0x6cc]
push ecx
call fcn.00403dc0
add esp, 8
mov edx, dword [ebp - 0x24]
movsx eax, byte [edx]
test eax, eax
jne 0x402465
push 0xa
mov ecx, dword [ebp - 0x24]
push ecx
call fcn.004021b0
add esp, 8
mov edx, dword [ebp - 0x24]
mov dword [edx + 5], 0x6d782e
mov eax, dword [ebp - 0x24]
push eax
lea ecx, [ebp - 0x6cc]
push ecx
push 0x42eb20
lea edx, [ebp - 0x7f4]
push edx
call dword [0x42ec98]
add esp, 0x10
mov eax, dword [ebp + 0xc]
push eax
call fcn.00401e50
add esp, 4
lea ecx, [ebp - 0x7f4]
push ecx
call fcn.00401440
add esp, 4
lea edx, [ebp - 0x7f4]
push edx
call fcn.004015d0
add esp, 4
mov byte [ebp - 0x964], al
mov eax, dword [ebp - 0x964]
and eax, 0xff
test eax, eax
je 0x4024dd
push 0
lea ecx, [ebp - 0x7f4]
push ecx
call fcn.00403ed0
add esp, 8
mov dword [eax], 0x6c
jmp 0x4024a0
lea edx, [ebp - 0x1c]
push edx
push 1
push 0
mov eax, dword [0x42e91c]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [0x42ec18]
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 0x42eafc
mov edx, dword [ebp - 0x1c]
push edx
call dword [str.0.iC]
mov dword [ebp - 0x47c], eax
mov eax, dword [ebp - 0x1c]
push eax
call dword [0x42ebf8]
cmp dword [ebp - 0x47c], 0
je 0x40253c
jmp 0x4025fc
call fcn.00403090
mov dword [ebp - 0x968], eax
cmp dword [ebp - 0x968], 0
jne 0x4025be
lea ecx, [ebp - 0x7f4]
push ecx
push 4
lea edx, [ebp - 0x478]
push edx
call fcn.00403510
add esp, 0xc
mov byte [ebp - 0x96c], al
mov eax, dword [ebp - 0x96c]
and eax, 0xff
test eax, eax
je 0x402587
mov eax, 1
jmp 0x40268c
lea ecx, [ebp - 0x7f4]
push ecx
push 3
lea edx, [ebp - 0x478]
push edx
call fcn.00403510
add esp, 0xc
mov byte [ebp - 0x970], al
mov eax, dword [ebp - 0x970]
and eax, 0xff
test eax, eax
je 0x4025be
mov eax, 1
jmp 0x40268c
lea ecx, [ebp - 0x7f4]
push ecx
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
lea ecx, [ebp - 0x478]
push ecx
call fcn.004035f0
add esp, 0x10
mov byte [ebp - 0x974], al
mov edx, dword [ebp - 0x974]
and edx, 0xff
test edx, edx
je 0x4025fc
mov eax, 1
jmp 0x40268c
mov eax, dword [ebp + 8]
push eax
call fcn.00401e50
add esp, 4
mov dword [ebp - 0x954], 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.00401f30
add esp, 8
push 0x42f2bc
mov ecx, dword [ebp - 0x954]
push ecx
mov edx, dword [ebp - 0x34]
push edx
lea eax, [ebp - 0x7f4]
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.00401780
add esp, 0x1c
mov dword [ebp - 0x978], eax
mov ecx, dword [ebp - 0x978]
mov dword [ebp - 0x14], ecx
jmp 0x40266a
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0x14], 0
je 0x40268a
mov edx, dword [ebp - 0x14]
push edx
call fcn.004026a0
add esp, 4
and eax, 0xff
jmp 0x40268c
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