Function at 0x4029c7
Capabilities:
Create process on windows
Query environment variable
Terminate process

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push ebx
push ecx
sub esp, 0x6f0
call fcn.004034f0
mov dword [ebp - 0x28], 1
mov dword [ebp - 0x2c], 1
mov dword [ebp - 0x30], 0xffffffff
mov dword [ebp - 0xc], 1
mov dword [ebp - 0x34], 1
mov dword [ebp - 0x38], 1
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x14], 0
lea eax, [ebp - 0x454]
mov dword [ebp - 0x660], eax
mov dword [ebp - 0x664], 0
mov dword [ebp - 0x668], 0
mov dword [esp + 0xc], 0x20
mov dword [esp + 8], str.mingw_d_bin
mov dword [esp + 4], pe_nt_image_headers32
mov dword [esp], 0x408040
call fcn.00401682
mov word [ebp - 0x65c], 0
mov dword [esp + 8], 0x104
lea eax, [ebp - 0x24c]
mov dword [esp + 4], eax
mov dword [esp], 0
mov eax, dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
call eax
sub esp, 0xc
lea eax, [ebp - 0x24c]
mov dword [esp], eax
mov eax, dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
call eax
sub esp, 4
test eax, eax
jne 0x402ade
mov eax, dword [sym.imp.msvcrt.dll__iob]
lea edx, [eax + 0x40]
lea eax, [ebp - 0x24c]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Invalid_executable_path:__s_n
mov dword [esp], edx
call sub.msvcrt.dll_fwprintf
mov dword [esp], 1
mov eax, dword [sym.imp.KERNEL32.dll_ExitProcess]
call eax
lea eax, [ebp - 0x24c]
mov dword [esp], eax
call sub.msvcrt.dll_wcslen
add eax, 1
lea edx, [eax + eax]
lea eax, [ebp - 0x24c]
add eax, edx
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x660]
lea edx, [ebp - 0x44]
mov dword [esp + 0x28], edx
lea edx, [ebp - 0x40]
mov dword [esp + 0x24], edx
lea edx, [ebp - 0x3c]
mov dword [esp + 0x20], edx
lea edx, [ebp - 0x38]
mov dword [esp + 0x1c], edx
lea edx, [ebp - 0x668]
mov dword [esp + 0x18], edx
lea edx, [ebp - 0x34]
mov dword [esp + 0x14], edx
lea edx, [ebp - 0x30]
mov dword [esp + 0x10], edx
lea edx, [ebp - 0x664]
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
lea eax, [ebp - 0x24c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call fcn.004021ac
test eax, eax
jne 0x402ffe
mov dword [esp + 4], str.git_gui.exe
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sub.msvcrt.dll__wcsicmp
test eax, eax
jne 0x402cf1
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x40], 1
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0
lea eax, [ebp - 0x24c]
mov dword [esp + 4], eax
lea eax, [ebp - 0x65c]
mov dword [esp], eax
call fcn.00402859
lea eax, [ebp - 0x65c]
mov dword [esp + 4], eax
lea eax, [ebp - 0x454]
mov dword [esp], eax
call sub.msvcrt.dll_wcscpy
mov dword [esp + 4], 0x408040
lea eax, [ebp - 0x454]
mov dword [esp], eax
mov eax, dword [sym.imp.SHLWAPI.dll_PathAppendW]
call eax
sub esp, 8
mov dword [esp + 4], str.wish.exe
lea eax, [ebp - 0x454]
mov dword [esp], eax
mov eax, dword [sym.imp.SHLWAPI.dll_PathAppendW]
call eax
sub esp, 8
mov dword [esp + 4], 0
lea eax, [ebp - 0x454]
mov dword [esp], eax
mov eax, dword [sym.imp.msvcrt.dll__waccess]
call eax
cmp eax, 0xffffffff
je 0x402c61
mov dword [esp], 0x408040
call sub.msvcrt.dll_wcslen
sub eax, 4
mov dword [esp + 0x14], 0x408040
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x65c]
mov dword [esp + 0xc], eax
mov dword [esp + 8], str.__s_.slibexecgit_core_
mov dword [esp + 4], 0x10000
mov dword [esp], 0x4280c0
call fcn.00401682
jmp 0x402cba
lea eax, [ebp - 0x65c]
mov dword [esp + 4], eax
lea eax, [ebp - 0x454]
mov dword [esp], eax
call sub.msvcrt.dll_wcscpy
mov dword [esp + 4], str.mingw_binwish.exe
lea eax, [ebp - 0x454]
mov dword [esp], eax
mov eax, dword [sym.imp.SHLWAPI.dll_PathAppendW]
call eax
sub esp, 8
lea eax, [ebp - 0x65c]
mov dword [esp + 0xc], eax
mov dword [esp + 8], str.__smingwlibexecgit_core_
mov dword [esp + 4], 0x10000
mov dword [esp], 0x4280c0
call fcn.00401682
mov dword [esp + 4], str.git_gui
mov dword [esp], 0x4280c0
mov eax, dword [sym.imp.SHLWAPI.dll_PathAppendW]
call eax
sub esp, 8
mov dword [ebp - 0x664], 0x4280c0
mov dword [esp], 0x4280c0
call sub.msvcrt.dll_wcslen
mov dword [ebp - 0x30], eax
jmp 0x402ffe
mov dword [esp + 8], 4
mov dword [esp + 4], str.git_
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sub.msvcrt.dll__wcsnicmp
test eax, eax
jne 0x402da0
mov dword [ebp - 0xc], 0
mov eax, dword [ebp - 0x18]
add eax, 8
mov dword [ebp - 0x664], eax
mov eax, dword [ebp - 0x664]
mov dword [esp], eax
call sub.msvcrt.dll_wcslen
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x664]
mov edx, dword [ebp - 0x30]
add edx, 0x7ffffffc
add edx, edx
add eax, edx
mov dword [esp + 4], str..exe
mov dword [esp], eax
call sub.msvcrt.dll__wcsicmp
test eax, eax
jne 0x402d68
mov eax, dword [ebp - 0x30]
sub eax, 4
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x24c]
mov dword [esp + 4], eax
lea eax, [ebp - 0x454]
mov dword [esp], eax
call sub.msvcrt.dll_wcscpy
mov dword [esp + 4], str.git.exe
lea eax, [ebp - 0x454]
mov dword [esp], eax
mov eax, dword [sym.imp.SHLWAPI.dll_PathAppendW]
call eax
sub esp, 8
jmp 0x402ffe
mov dword [esp + 4], str.git.exe
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sub.msvcrt.dll__wcsicmp
test eax, eax
jne 0x402e8a
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0
lea eax, [ebp - 0x24c]
mov dword [esp + 4], eax
lea eax, [ebp - 0x65c]
mov dword [esp], eax
call fcn.00402859
lea eax, [ebp - 0x65c]
mov dword [esp + 4], eax
lea eax, [ebp - 0x454]
mov dword [esp], eax
call sub.msvcrt.dll_wcscpy
mov dword [esp + 4], 0x408040
lea eax, [ebp - 0x454]
mov dword [esp], eax
mov eax, dword [sym.imp.SHLWAPI.dll_PathAppendW]
call eax
sub esp, 8
mov dword [esp + 4], str.git.exe
lea eax, [ebp - 0x454]
mov dword [esp], eax
mov eax, dword [sym.imp.SHLWAPI.dll_PathAppendW]
call eax
sub esp, 8
mov dword [esp + 4], 0
lea eax, [ebp - 0x454]
mov dword [esp], eax
mov eax, dword [sym.imp.msvcrt.dll__waccess]
call eax
cmp eax, 0xffffffff
jne 0x402ffe
lea eax, [ebp - 0x65c]
mov dword [esp + 4], eax
lea eax, [ebp - 0x454]
mov dword [esp], eax
call sub.msvcrt.dll_wcscpy
mov dword [esp + 4], str.bingit.exe
lea eax, [ebp - 0x454]
mov dword [esp], eax
mov eax, dword [sym.imp.SHLWAPI.dll_PathAppendW]
call eax
sub esp, 8
jmp 0x402ffe
mov dword [esp + 4], str.gitk.exe
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
call sub.msvcrt.dll__wcsicmp
test eax, eax
jne 0x402ffe
mov dword [ebp - 0x40], 1
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0
lea eax, [ebp - 0x24c]
mov dword [esp + 4], eax
lea eax, [ebp - 0x65c]
mov dword [esp], eax
call fcn.00402859
lea eax, [ebp - 0x65c]
mov dword [esp + 4], eax
lea eax, [ebp - 0x454]
mov dword [esp], eax
call sub.msvcrt.dll_wcscpy
lea eax, [ebp - 0x65c]
mov dword [esp + 0xc], eax
mov dword [esp + 8], str.__s_
mov dword [esp + 4], 0x10000
mov dword [esp], 0x4480c0
call fcn.00401682
mov dword [esp + 4], 0x408040
lea eax, [ebp - 0x454]
mov dword [esp], eax
mov eax, dword [sym.imp.SHLWAPI.dll_PathAppendW]
call eax
sub esp, 8
mov dword [esp + 4], str.wish.exe
lea eax, [ebp - 0x454]
mov dword [esp], eax
mov eax, dword [sym.imp.SHLWAPI.dll_PathAppendW]
call eax
sub esp, 8
mov dword [esp + 4], 0
lea eax, [ebp - 0x454]
mov dword [esp], eax
mov eax, dword [sym.imp.msvcrt.dll__waccess]
call eax
cmp eax, 0xffffffff
je 0x402f80
mov dword [esp + 4], 0x408040
mov dword [esp], 0x4480c0
mov eax, dword [sym.imp.SHLWAPI.dll_PathAppendW]
call eax
sub esp, 8
jmp 0x402fcc
lea eax, [ebp - 0x65c]
mov dword [esp + 4], eax
lea eax, [ebp - 0x454]
mov dword [esp], eax
call sub.msvcrt.dll_wcscpy
mov dword [esp + 4], str.mingw_binwish.exe
lea eax, [ebp - 0x454]
mov dword [esp], eax
mov eax, dword [sym.imp.SHLWAPI.dll_PathAppendW]
call eax
sub esp, 8
mov dword [esp + 4], str.mingw_bin
mov dword [esp], 0x4480c0
mov eax, dword [sym.imp.SHLWAPI.dll_PathAppendW]
call eax
sub esp, 8
mov dword [esp + 4], str.gitk
mov dword [esp], 0x4480c0
mov eax, dword [sym.imp.SHLWAPI.dll_PathAppendW]
call eax
sub esp, 8
mov dword [ebp - 0x664], 0x4480c0
mov dword [esp], 0x4480c0
call sub.msvcrt.dll_wcslen
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0xc], 0
je 0x40304d
movzx eax, word [ebp - 0x65c]
test ax, ax
jne 0x403038
mov dword [esp + 0xc], 0xfffffffc
mov dword [esp + 8], 0x408040
lea eax, [ebp - 0x24c]
mov dword [esp + 4], eax
lea eax, [ebp - 0x65c]
mov dword [esp], eax
call fcn.00402859
mov eax, dword [ebp - 0x38]
mov dword [esp + 4], eax
lea eax, [ebp - 0x65c]
mov dword [esp], eax
call fcn.00401791
mov ebx, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x34]
mov edx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x664]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x2c]
mov dword [esp + 8], eax
lea eax, [ebp - 0x660]
mov dword [esp + 4], eax
lea eax, [ebp - 0x24c]
mov dword [esp], eax
call fcn.00401b74
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x668]
cmp eax, 1
jne 0x4030f8
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], str.HOME
mov eax, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
call eax
sub esp, 0xc
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x4030f8
mov eax, dword [ebp - 0x1c]
add eax, eax
mov dword [esp], eax
call sub.msvcrt.dll_malloc
mov dword [ebp - 0x668], eax
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x668]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], str.HOME
mov eax, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
call eax
sub esp, 0xc
mov dword [ebp - 0x10], 0x400
mov dword [ebp - 0x20], 0
mov dword [esp + 8], 0x10
mov dword [esp + 4], 0
lea eax, [ebp - 0x678]
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov dword [esp + 8], 0x44
mov dword [esp + 4], 0
lea eax, [ebp - 0x6bc]
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov dword [ebp - 0x6bc], 0x44
mov edx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x44]
or eax, edx
test eax, eax
je 0x403161
or dword [ebp - 0x10], 0x10
jmp 0x403252
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], pe_nt_image_headers32
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 2
mov dword [esp + 4], 0x40000000
mov dword [esp], str.CONOUT_
mov eax, dword [sym.imp.KERNEL32.dll_CreateFileW]
call eax
sub esp, 0x1c
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0xffffffff
je 0x4031c0
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
jmp 0x403252
mov dword [esp], 0xfffffff6
mov eax, dword [sym.imp.KERNEL32.dll_GetStdHandle]
call eax
sub esp, 4
mov dword [ebp - 0x684], eax
mov eax, dword [ebp - 0x684]
test eax, eax
jne 0x4031eb
mov dword [ebp - 0x684], 0xffffffff
mov dword [esp], 0xfffffff5
mov eax, dword [sym.imp.KERNEL32.dll_GetStdHandle]
call eax
sub esp, 4
mov dword [ebp - 0x680], eax
mov eax, dword [ebp - 0x680]
test eax, eax
jne 0x403216
mov dword [ebp - 0x680], 0xffffffff
mov dword [esp], 0xfffffff4
mov eax, dword [sym.imp.KERNEL32.dll_GetStdHandle]
call eax
sub esp, 4
mov dword [ebp - 0x67c], eax
mov eax, dword [ebp - 0x67c]
test eax, eax
jne 0x403241
mov dword [ebp - 0x67c], 0xffffffff
mov dword [ebp - 0x690], 0x100
or dword [ebp - 0x10], 0x8000000
mov eax, dword [ebp - 0x44]
test eax, eax
je 0x403271
mov eax, dword [ebp - 0x690]
or eax, 1
mov dword [ebp - 0x690], eax
mov word [ebp - 0x68c], 5
mov ecx, dword [ebp - 0x668]
mov eax, dword [ebp - 0x40]
test eax, eax
sete al
movzx edx, al
mov eax, dword [ebp - 0x660]
lea ebx, [ebp - 0x678]
mov dword [esp + 0x24], ebx
lea ebx, [ebp - 0x6bc]
mov dword [esp + 0x20], ebx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], 0
mov ecx, dword [ebp - 0x10]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov edx, dword [ebp - 0x14]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CreateProcessW]
call eax
sub esp, 0x28
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
je 0x40334c
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x403302
mov eax, dword [ebp - 0x678]
mov dword [esp + 4], 0xffffffff
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
call eax
sub esp, 8
mov eax, dword [ebp - 0x678]
lea edx, [ebp - 0x28]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
call eax
sub esp, 8
test eax, eax
jne 0x403337
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov dword [esp + 4], eax
mov dword [esp], str.error_reading_exit_code
call fcn.004016b9
mov eax, dword [ebp - 0x678]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
jmp 0x40336a
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov dword [esp + 4], eax
mov dword [esp], str.error_launching_git
call fcn.004016b9
mov dword [ebp - 0x28], 1
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sub.msvcrt.dll_free
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_ExitProcess]
call eax
nop
nop
nop
nop
nop
nop
nop
nop