Function at 0x407690
Capabilities:
Create thread
Set environment variable
Terminate thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d7ef0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x44
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
push ebx
push esi
xor esi, esi
push edi
mov dword [ebp - 0x14], ecx
mov byte [ebp - 0xd], 0
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x30], esi
mov byte [ebp - 0x24], 0
mov dword [ebp - 4], esi
mov dword [ebp - 0x50], esi
mov dword [ebp - 0x4c], esi
mov dword [ebp - 0x44], esi
mov dword [ebp - 0x40], esi
mov dword [ebp - 0x48], esi
mov byte [ebp - 0x3c], 0
push esi
lea edx, [ebp - 0x38]
push edx
lea eax, [ebp - 0x14]
push eax
mov byte [ebp - 4], 1
call fcn.00407360
add esp, 0xc
test eax, eax
je 0x407708
mov edi, dword [ebp - 0x34]
jmp 0x40783f
xor esi, esi
mov edi, dword [ebp - 0x34]
push 0x4e5994
mov dword [ebp - 0x18], esi
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpiW]
push edi
xor bl, bl
call esi
test eax, eax
jne 0x4078c5
push eax
lea ecx, [ebp - 0x38]
push ecx
lea edx, [ebp - 0x14]
push edx
call fcn.00407360
mov edi, dword [ebp - 0x34]
add esp, 0xc
test eax, eax
jne 0x40783d
push 0x3d
push edi
call fcn.004c9bca
add esp, 8
cmp eax, edi
jbe 0x40783d
mov dword [ebp - 0x18], edi
cmp dword [ebp - 0x18], 0
je 0x40783d
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x48], ecx
push 0
lea ecx, [ebp - 0x50]
mov dword [ebp - 0x44], edx
push ecx
lea edx, [ebp - 0x14]
push edx
mov dword [ebp - 0x40], eax
call fcn.00407360
add esp, 0xc
test eax, eax
jne 0x4077b9
mov eax, dword [ebp - 0x4c]
push 0x4e5990
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
jne 0x40779f
mov bl, 1
mov ecx, dword [ebp - 0x48]
mov edx, dword [ebp - 0x44]
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x28], eax
test bl, bl
je 0x40783d
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x407818
push 0x3d
push eax
call fcn.004c9bca
mov esi, eax
add esp, 8
test esi, esi
je 0x40783d
cmp byte [ebp + 0xc], 0
je 0x407814
xor ecx, ecx
mov word [esi], cx
add esi, 2
push esi
call fcn.004c6380
mov edi, eax
add esp, 4
test edi, edi
je 0x4077f0
mov esi, edi
test esi, esi
je 0x4077fa
cmp word [esi], 0
jne 0x4077fc
xor esi, esi
mov edx, dword [ebp - 0x18]
push esi
push edx
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
test edi, edi
je 0x407814
push edi
call fcn.0044c4f0
add esp, 4
mov byte [ebp - 0xd], 1
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp + 8]
push 0
lea edx, [ebp - 0x38]
mov dword [ecx], eax
push edx
lea eax, [ebp - 0x14]
push eax
call fcn.00407360
add esp, 0xc
test eax, eax
je 0x407706
mov edi, dword [ebp - 0x34]
xor esi, esi
mov ecx, dword [ebp + 8]
mov eax, dword [ecx]
cmp eax, esi
je 0x40784d
cmp word [eax], si
jne 0x407853
mov dword [ecx], 0x510180
cmp byte [ebp - 0x3c], 0
mov ebx, dword [ebp - 0x4c]
mov byte [ebp - 4], 0
je 0x407875
cmp ebx, esi
je 0x407882
cmp word [ebx], si
je 0x407875
push ebx
push str.PATH
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
cmp ebx, esi
je 0x407882
push ebx
call fcn.0044c4f0
add esp, 4
cmp byte [ebp - 0x24], 0
mov dword [ebp - 4], 0xffffffff
je 0x4078a4
cmp edi, esi
je 0x4078b1
cmp word [edi], si
je 0x4078a4
push edi
push str.PATH
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
cmp edi, esi
je 0x4078b1
push edi
call fcn.0044c4f0
add esp, 4
mov ecx, dword [ebp - 0xc]
mov al, byte [ebp - 0xd]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
push 4
push str.set
push edi
call fcn.0044d3f0
add esp, 0xc
test eax, eax
jne 0x407920
lea esi, [edi + 8]
test esi, esi
jne 0x407900
push 0x3d
push esi
call fcn.004c9bca
add esp, 8
cmp eax, esi
jbe 0x40783d
mov dword [ebp - 0x18], esi
jmp 0x407758
movzx eax, word [esi]
cmp ax, 0x20
je 0x40791b
cmp ax, 9
je 0x40791b
cmp ax, 0xd
je 0x40791b
cmp ax, 0xa
jne 0x4078e0
add esi, 2
jmp 0x407900
push str.chcp
push edi
call esi
test eax, eax
jne 0x407a3c
push eax
lea eax, [ebp - 0x38]
push eax
lea ecx, [ebp - 0x14]
push ecx
call fcn.00407360
mov edi, dword [ebp - 0x34]
add esp, 0xc
test eax, eax
jne 0x40783d
push str.utf_8
push edi
call esi
test eax, eax
je 0x407a35
push str.utf8
push edi
call esi
test eax, eax
je 0x407a35
push 0x4e5958
push edi
call esi
test eax, eax
je 0x40783d
push str.ansi
push edi
call esi
test eax, eax
je 0x40783d
push str.ansicp
push edi
call esi
test eax, eax
je 0x40783d
push 0x4e5934
push edi
call esi
test eax, eax
je 0x407a2e
push str.oemcp
push edi
call esi
test eax, eax
je 0x407a2e
push 0xa
lea edx, [ebp - 0x1c]
push edx
push edi
call fcn.004c9eb4
add esp, 0xc
test eax, eax
jbe 0x40783d
cmp eax, 0xffff
ja 0x40783d
cmp byte [ebp + 0xc], 0
mov bl, 1
je 0x407762
lea ecx, [ebp - 0x20]
push ecx
push 0
push eax
push 0x406f40
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov esi, eax
test esi, esi
je 0x407762
push 0x3e8
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x407a22
push 0x64
push esi
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x407762
mov eax, 1
jmp 0x4079da
mov eax, 0xfde9
jmp 0x4079da
push str.title
push edi
call esi
test eax, eax
jne 0x40783d
push eax
lea edx, [ebp - 0x38]
push edx
lea eax, [ebp - 0x14]
push eax
call fcn.00407360
add esp, 0xc
test eax, eax
jne 0x40783a
mov ecx, dword [ebp + 0x10]
mov edi, dword [ebp - 0x34]
mov bl, 1
test ecx, ecx
je 0x407762
push 0xffffffffffffffff
push edi
call fcn.00407140
jmp 0x407762