Function at 0x401170
Capabilities:
Check if file exists
Create process on windows
Delete file
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4023a0
mov eax, dword fs:[0]
push eax
sub esp, 0x28c
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea eax, [ebp - 0x284]
mov dword [ebp - 0x284], 0
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_IsWow64Process]
cmp dword [ebp - 0x284], 0
mov esi, str.GH_Injector___x64.exe
mov edi, str.GH_Injector___x86.exe
cmove esi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4011e7
cmp dword [ebp - 0x284], 0
cmove edi, esi
mov esi, edi
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push esi
call edi
cmp eax, 0xffffffff
jne 0x401213
push 0x10
push str.Error
push str.GH_Injector_executables_are_missing._Make_sure_all_files_are_in_the_correct_directory.
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, 2
jmp 0x40146e
lea eax, [ebp - 0x294]
mov dword [ebp - 0x280], 0x44
push eax
lea eax, [ebp - 0x280]
xorps xmm0, xmm0
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push esi
movups xmmword [ebp - 0x294], xmm0
movlpd qword [ebp - 0x27c], xmm0
movlpd qword [ebp - 0x274], xmm0
movlpd qword [ebp - 0x26c], xmm0
movlpd qword [ebp - 0x264], xmm0
movlpd qword [ebp - 0x25c], xmm0
movlpd qword [ebp - 0x254], xmm0
movlpd qword [ebp - 0x24c], xmm0
movlpd qword [ebp - 0x244], xmm0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x4013df
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov byte [ebp - 0x14], 0
push 0x10
push 9
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x298], esi
push eax
xorps xmm0, xmm0
push esi
movq qword [ebp - 0x1c], xmm0
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__ultoa_s]
xorps xmm0, xmm0
mov dword [ebp - 0x22c], 0
movups xmmword [ebp - 0x23c], xmm0
add esp, 0x10
mov dword [ebp - 0x228], 0xf
mov byte [ebp - 0x23c], 0
push 0x42
push str.Failed_to_launch_GH_Injector._CreateProcess_returned_error_code_0x
push dword [ebp - 0x298]
lea ecx, [ebp - 0x23c]
mov dword [ebp - 4], 0
push 0x42
call fcn.004014e0
lea edi, [ebp - 0x1c]
lea ecx, [edi + 1]
nop word [eax + eax]
mov al, byte [edi]
inc edi
test al, al
jne 0x401310
mov edx, dword [ebp - 0x228]
sub edi, ecx
mov ecx, dword [ebp - 0x22c]
mov eax, edx
sub eax, ecx
push edi
cmp edi, eax
ja 0x401362
lea eax, [edi + ecx]
cmp edx, 0xf
mov dword [ebp - 0x22c], eax
lea esi, [ebp - 0x23c]
cmova esi, dword [ebp - 0x23c]
lea eax, [ebp - 0x1c]
add esi, ecx
push eax
push esi
call sub.VCRUNTIME140.dll_memmove
mov byte [esi + edi], 0
add esp, 0xc
mov esi, dword [ebp - 0x298]
jmp 0x401378
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x298]
lea ecx, [ebp - 0x23c]
push edi
call fcn.004014e0
cmp dword [ebp - 0x228], 0xf
lea eax, [ebp - 0x23c]
push 0x10
cmova eax, dword [ebp - 0x23c]
push str.Error
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov ecx, dword [ebp - 0x228]
cmp ecx, 0xf
jbe 0x4013d8
mov edx, dword [ebp - 0x23c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4013ce
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4013ce
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.0040167f
add esp, 8
mov eax, esi
jmp 0x40146e
push dword [ebp - 0x294]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x290]
call esi
push 0x208
lea eax, [ebp - 0x224]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x224]
push 0
push eax
push 0x104
push str.OLD.exe
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
lea eax, [ebp - 0x224]
push eax
call edi
cmp eax, 0xffffffff
je 0x40146c
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [ebp - 0x224]
push eax
call esi
test eax, eax
jne 0x40146c
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [eax + eax]
call edi
cmp eax, 5
jne 0x40146c
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x224]
push eax
call esi
test eax, eax
je 0x401450
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040163c
mov esp, ebp
pop ebp
ret