Function at 0x40386d
Capabilities:
Check if file exists
Create process on windows
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x558
push ebx
push esi
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov esi, 0x104
push esi
lea eax, [ebp - 0x24c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x24c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x403b22
push 8
pop eax
call sub.ntdll.dll__alloca_probe
mov eax, esp
mov dword [ebp - 8], eax
test eax, eax
je 0x4038cd
push 0x92
push 4
mov edx, 0x40a474
call fcn.00404340
push 0x1c
pop eax
call sub.ntdll.dll__alloca_probe
mov edi, esp
test edi, edi
je 0x4038ee
push 0x8f
push 0x1b
mov eax, edi
mov edx, 0x40a1f0
call fcn.00404340
push 0x14
pop eax
call sub.ntdll.dll__alloca_probe
mov ebx, esp
test ebx, ebx
je 0x40390f
push 0x8e
push 0x13
mov eax, ebx
mov edx, 0x40a20c
call fcn.00404340
push 8
pop eax
call sub.ntdll.dll__alloca_probe
mov eax, esp
mov dword [ebp - 4], eax
test eax, eax
je 0x403931
push 0x88
push 4
mov edx, 0x40a81c
call fcn.00404340
push 8
pop eax
call sub.ntdll.dll__alloca_probe
mov eax, esp
test eax, eax
je 0x403950
push 0x86
push 6
mov edx, 0x40a920
call fcn.00404340
lea ecx, [ebp - 0x24c]
push ecx
push eax
lea eax, [ebp - 0x558]
push esi
push eax
call sub.ntdll.dll__snprintf
lea ecx, [ebp - 0x148]
add esp, 0x10
mov eax, edi
sub ecx, edi
mov dl, byte [eax]
mov byte [ecx + eax], dl
inc eax
test dl, dl
jne 0x403972
push 0xa
call fcn.00404796
add eax, 0xa
push eax
call fcn.00404400
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40398e
lea edi, [ebp - 0x148]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x40399e
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
mov eax, ebx
rep movsb byte es:[edi], byte [esi]
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4039ba
lea edi, [ebp - 0x148]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4039cc
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
push 3
rep movsb byte es:[edi], byte [esi]
xor ebx, ebx
call fcn.00404796
add eax, 3
push eax
call fcn.00404400
mov edi, eax
test edi, edi
je 0x403b22
lea eax, [ebp - 0x350]
push eax
mov esi, 0x104
push esi
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
je 0x403a37
call fcn.004046ae
mov ebx, eax
test ebx, ebx
je 0x403a37
push ebx
push 0xffffffffffffffff
call fcn.00404796
push eax
push edi
lea eax, [ebp - 0x350]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
mov esi, edi
call fcn.00404762
test ebx, ebx
je 0x403b22
mov eax, dword [ebp - 8]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403a4b
sub eax, edx
lea edi, [ebx - 1]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x403a57
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea eax, [ebp - 0x148]
rep movsb byte es:[edi], byte [esi]
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x403a78
sub eax, ecx
lea ecx, [ebp - 0x148]
push ecx
push ebx
call fcn.004037e2
test eax, eax
je 0x403b1b
lea edx, [ebp - 0x454]
mov eax, ebx
sub edx, ebx
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x403aa0
mov ecx, dword [ebp - 4]
xor eax, eax
mov dword [ebp - 0x38], ecx
lea ecx, [ebp - 0x454]
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x34], ecx
lea eax, [ebp - 0x44]
lea ecx, [ebp - 0x558]
push eax
mov dword [ebp - 0x44], 0x3c
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x40], 0x800040
call dword [sym.imp.SHELL32.dll_ShellExecuteExA]
test eax, eax
je 0x403b1b
mov esi, dword [sym.imp.KERNEL32.dll_SetPriorityClass]
push 0x40
push dword [ebp - 0xc]
call esi
push dword [ebp - 0xc]
call fcn.00402796
push 0x100
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call esi
push 0xf
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov esi, ebx
call fcn.00404762
lea esp, [ebp - 0x564]
pop edi
pop esi
pop ebx
leave
ret