Function at 0x6d7f0f6c
Capabilities:
Create process on windows
Query environment variable
Set environment variable

Disassembly:
push ebp
sub esp, 0x800
lea ebp, [esp - 4]
mov eax, dword [0x6d808560]
xor eax, ebp
mov dword [ebp + 0x800], eax
push 0xa8
mov eax, 0x6d7fb0d6
call fcn.6d7f98e7
xor ebx, ebx
mov esi, ecx
push ebx
push dword [esi + 4]
call dword [sym.imp.USER32.dll_EnableWindow]
mov ecx, esi
call fcn.6d7f0db1
movzx eax, word [ebp + 0x810]
push eax
push dword [esi + 4]
call dword [sym.imp.USER32.dll_EndDialog]
mov dword [ebp - 0x18], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], ebx
mov eax, dword [esi + 0x44]
mov ecx, dword [eax]
lea edx, [ebp - 0x14]
push edx
push 0x6d80014c
push eax
mov byte [ebp - 4], 3
call dword [ecx]
cmp eax, ebx
jl 0x6d7f1015
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
lea edx, [ebp - 0x10]
push edx
push 0x6d80013c
push 0x6d80012c
push eax
call dword [ecx + 0xc]
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax]
lea edx, [ebp - 0x18]
push edx
push eax
call dword [ecx + 0x78]
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax]
lea edx, [ebp - 0x1c]
push edx
push eax
call dword [ecx + 0x98]
mov eax, dword [ebp - 0x18]
mov byte [ebp], bl
mov dword [ebp - 0x24], eax
cmp eax, ebx
je 0x6d7f1031
push eax
call dword [sym.imp.kernel32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jle 0x6d7f1036
mov dword [ebp - 0x20], ebx
jmp 0x6d7f1051
lea edi, [eax + eax]
mov eax, edi
call fcn.6d7f98a0
mov eax, esp
push 3
push edi
push dword [ebp - 0x24]
push eax
call fcn.6d7ef3c4
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x24], eax
cmp eax, ebx
je 0x6d7f106a
push eax
call dword [sym.imp.kernel32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jle 0x6d7f106e
xor eax, eax
jmp 0x6d7f1086
lea edi, [eax + eax]
mov eax, edi
call fcn.6d7f98a0
mov eax, esp
push 3
push edi
push dword [ebp - 0x24]
push eax
call fcn.6d7ef3c4
push dword [ebp - 0x20]
mov edi, 0x400
push eax
push 0x6d7fe538
lea eax, [ebp]
push edi
push eax
call dword [sym.imp.MSVCR100.dll_sprintf_s]
push 0x44
lea eax, [ebp - 0xb4]
push ebx
push eax
call sub.MSVCR100.dll_memset
push 5
add esi, 0x68
push 0x6d7fe544
push esi
mov dword [ebp - 0xb4], 0x44
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x60], esi
call dword [sym.imp.MSVCR100.dll_strncmp]
add esp, 0x2c
test eax, eax
jne 0x6d7f12c7
push 0x3ff
lea eax, [ebp + 0x401]
push ebx
push eax
mov dword [ebp - 0x24], edi
mov byte [ebp + 0x400], bl
call sub.MSVCR100.dll_memset
add esp, 0xc
mov esi, 0x20019
push esi
push 0x6d7fe54c
push reloc.OLEAUT32.dll_SysReAllocString
lea ecx, [ebp - 0x44]
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x50], ebx
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x54], ebx
call fcn.6d7ef3c4
test eax, eax
je 0x6d7f1160
lea ecx, [ebp - 0x5c]
call fcn.6d7e2c8b
lea ecx, [ebp - 0x38]
call fcn.6d7e2c8b
lea ecx, [ebp - 0x50]
call fcn.6d7e2c8b
lea ecx, [ebp - 0x44]
call fcn.6d7e2c8b
jmp 0x6d7f1336
push esi
push 0x6d7fe558
push dword [ebp - 0x44]
lea ecx, [ebp - 0x50]
call fcn.6d7ef3c4
test eax, eax
jne 0x6d7f113b
push esi
push 0x6d7fe564
push dword [ebp - 0x50]
lea ecx, [ebp - 0x38]
call fcn.6d7ef3c4
lea ecx, [ebp - 0x5c]
test eax, eax
jne 0x6d7f113e
push esi
push dword [ebp - 0x60]
push dword [ebp - 0x38]
call fcn.6d7ef3c4
lea ecx, [ebp - 0x5c]
test eax, eax
jne 0x6d7f113e
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp + 0x400]
push eax
push 0x6d7fe580
call fcn.6d7ef3c4
test eax, eax
jne 0x6d7f113b
push ebx
lea eax, [ebp - 0x29]
push eax
push 0x6d7fe58c
mov byte [ebp - 0x29], bl
call dword [sym.imp.kernel32.dll_GetEnvironmentVariableA]
mov esi, dword [sym.imp.MSVCR100.dll_calloc]
mov edi, eax
mov dword [ebp - 0x24], edi
cmp edi, ebx
jne 0x6d7f11ed
call dword [sym.imp.kernel32.dll_GetLastError]
cmp eax, 0xcb
je 0x6d7f122f
jmp 0x6d7f113b
push 1
push edi
call esi
pop ecx
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, ebx
je 0x6d7f113b
push edi
push eax
push 0x6d7fe594
call dword [sym.imp.kernel32.dll_GetEnvironmentVariableA]
mov dword [ebp - 0x24], eax
cmp eax, ebx
jne 0x6d7f122c
call dword [sym.imp.kernel32.dll_GetLastError]
test eax, eax
je 0x6d7f122c
push dword [ebp - 0x28]
call dword [sym.imp.MSVCR100.dll_free]
pop ecx
jmp 0x6d7f113b
mov edi, dword [ebp - 0x24]
lea eax, [ebp + 0x400]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x6d7f1238
sub eax, edx
lea edi, [eax + edi + 6]
push 1
push edi
call esi
pop ecx
pop ecx
mov dword [ebp - 0x20], eax
cmp eax, ebx
jne 0x6d7f125e
cmp dword [ebp - 0x28], ebx
je 0x6d7f113b
jmp 0x6d7f121d
mov esi, dword [sym.imp.MSVCR100.dll_strcat_s]
lea ecx, [ebp + 0x400]
push ecx
push edi
push eax
call esi
push str._bin
push edi
push dword [ebp - 0x20]
call esi
add esp, 0x18
cmp dword [ebp - 0x24], ebx
jbe 0x6d7f1299
push 0x6d7fe5a4
push edi
push dword [ebp - 0x20]
call esi
push dword [ebp - 0x28]
push edi
push dword [ebp - 0x20]
call esi
add esp, 0x18
push dword [ebp - 0x20]
push 0x6d7fe5a8
call dword [sym.imp.kernel32.dll_SetEnvironmentVariableA]
lea ecx, [ebp - 0x5c]
call fcn.6d7e2c8b
lea ecx, [ebp - 0x38]
call fcn.6d7e2c8b
lea ecx, [ebp - 0x50]
call fcn.6d7e2c8b
lea ecx, [ebp - 0x44]
call fcn.6d7e2c8b
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0xb4]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp]
push eax
push ebx
call dword [sym.imp.kernel32.dll_CreateProcessA]
cmp eax, ebx
je 0x6d7f12f5
push 0x1388
push dword [ebp - 0x70]
call dword [sym.imp.USER32.dll_WaitForInputIdle]
push 5
push str.1.3.1
push dword [ebp - 0x60]
call dword [sym.imp.MSVCR100.dll_strncmp]
add esp, 0xc
test eax, eax
jne 0x6d7f131a
push dword [ebp - 0x28]
push str.PATH
call dword [sym.imp.kernel32.dll_SetEnvironmentVariableA]
mov esi, dword [sym.imp.MSVCR100.dll_free]
cmp dword [ebp - 0x28], ebx
je 0x6d7f132b
push dword [ebp - 0x28]
call esi
pop ecx
cmp dword [ebp - 0x20], ebx
je 0x6d7f1336
push dword [ebp - 0x20]
call esi
pop ecx
mov eax, dword [ebp - 0x10]
mov byte [ebp - 4], 2
cmp eax, ebx
je 0x6d7f1347
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x14]
mov byte [ebp - 4], 1
cmp eax, ebx
je 0x6d7f1358
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
push dword [ebp - 0x1c]
mov esi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
call esi
push dword [ebp - 0x18]
call esi
xor eax, eax
lea esp, [ebp - 0xc4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x800]
xor ecx, ebp
call fcn.6d7f98d8
add ebp, 0x804
leave
ret 0x10