Function at 0x4022ce
Capabilities:
Accept command line arguments
Create process on windows
Get common file path
Get file size
Read file via mapping

Disassembly:
push ebp
lea ebp, [esp - 0x70]
mov eax, 0x104c8
call fcn.00401fd0
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
cmp byte [eax], 0x22
mov esi, dword [sym.imp.USER32.dll_CharNextA]
sete cl
push eax
lea ecx, [ecx + ecx + 0x20]
mov byte [ebp + 0x6f], cl
call esi
xor ebx, ebx
jmp 0x402308
cmp al, byte [ebp + 0x6f]
je 0x402310
push edi
call esi
mov edi, eax
mov al, byte [edi]
cmp al, bl
jne 0x402300
cmp byte [edi], 0x22
jne 0x402316
inc edi
push 0x44
pop esi
push esi
lea eax, [ebp - 0x58]
push ebx
push eax
call fcn.00401eda
add esp, 0xc
push dword [ebp + 0x78]
lea eax, [ebp - 0x10457]
push eax
mov dword [ebp - 0x58], esi
mov byte [ebp - 0x10458], 0x22
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x10458]
push 0x401560
push eax
call fcn.00401fb8
pop ecx
pop ecx
push ebx
push ebx
push 3
push ebx
push 1
push 0x80000000
push 0x401554
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
mov dword [ebp + 0x60], esi
jne 0x402380
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x4025e3
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push ebx
push eax
push ebx
push 2
push ebx
push esi
mov dword [ebp + 0x68], eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
cmp eax, ebx
mov dword [ebp + 0x64], eax
je 0x402375
push dword [ebp + 0x68]
push ebx
push ebx
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov esi, eax
cmp esi, ebx
jne 0x4023c5
push dword [ebp + 0x64]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
push dword [ebp + 0x60]
call edi
jmp 0x402375
lea eax, [ebp - 0x10458]
push eax
call fcn.00401f94
pop ecx
xor ecx, ecx
cmp dword [ebp + 0x68], ebx
jbe 0x402402
lea eax, [ebp + eax - 0x10458]
mov dword [ebp + 0x44], eax
mov eax, dword [ebp + 0x44]
lea edx, [eax + ecx]
mov byte [edx], bl
mov al, byte [ecx + esi]
cmp al, 0xa
je 0x402402
cmp al, 0xd
je 0x402402
cmp al, 0x30
je 0x402402
inc ecx
cmp ecx, dword [ebp + 0x68]
mov byte [edx], al
jb 0x4023e3
push esi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [ebp + 0x64]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp + 0x60]
call esi
lea eax, [ebp - 0x10458]
push 0x401550
push eax
call fcn.00401fb8
lea eax, [ebp - 0x10458]
push edi
push eax
call fcn.00401fb8
push dword [section..data]
call fcn.00401f94
add esp, 0x14
test eax, eax
je 0x40246f
lea eax, [ebp - 0x10458]
push 0x40154c
push eax
call fcn.00401fb8
push dword [section..data]
lea eax, [ebp - 0x10458]
push eax
call fcn.00401fb8
add esp, 0x10
lea eax, [ebp + 0x48]
push eax
lea eax, [ebp - 0x58]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0x10458]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x40252e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x2e4
je 0x4024ab
cmp eax, 0x202b
jne 0x4025e3
push 0x3c
pop edi
push edi
lea eax, [ebp + 8]
push ebx
push eax
call fcn.00401eda
add esp, 0xc
lea eax, [ebp - 0x458]
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea eax, [ebp - 0x10456]
push 0x22
push eax
call fcn.00401f9f
inc eax
cmp byte [eax], bl
pop ecx
pop ecx
je 0x4024e6
mov byte [eax], bl
inc eax
mov dword [ebp + 0x1c], eax
lea eax, [ebp - 0x458]
mov dword [ebp + 0x20], eax
lea eax, [ebp + 8]
lea ecx, [ebp - 0x10458]
push eax
mov dword [ebp + 8], edi
mov dword [ebp + 0xc], 0x40
mov dword [ebp + 0x10], ebx
mov dword [ebp + 0x14], 0x401544
mov dword [ebp + 0x18], ecx
mov dword [ebp + 0x24], 1
call dword [sym.imp.SHELL32.dll_ShellExecuteExA]
mov eax, dword [ebp + 0x40]
cmp eax, ebx
mov dword [ebp + 0x48], eax
je 0x402375
mov eax, dword [ebp + 0x48]
mov dword [ebp + 0x58], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea edi, [ebp - 0x10458]
call fcn.0040221d
pop ecx
mov eax, edi
push eax
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateEventA]
xor ecx, ecx
cmp eax, ebx
setne cl
mov dword [ebp + 0x5c], eax
inc ecx
mov edi, ecx
push 0x4ff
push 0xffffffffffffffff
push ebx
lea eax, [ebp + 0x58]
push eax
push edi
call dword [sym.imp.USER32.dll_MsgWaitForMultipleObjects]
cmp eax, edi
jne 0x4025a7
push 1
push ebx
push ebx
push ebx
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.USER32.dll_PeekMessageA]
cmp dword [ebp - 0x10], 0x12
je 0x402592
cmp dword [ebp - 0x10], 0x10
jne 0x40259b
push dword [ebp + 0x48]
call fcn.0040228e
pop ecx
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
jmp 0x402560
cmp edi, 2
jne 0x4025bc
cmp eax, 1
jne 0x4025bc
push dword [ebp + 0x48]
call fcn.0040228e
pop ecx
jmp 0x402560
cmp dword [ebp + 0x5c], ebx
je 0x4025c6
push dword [ebp + 0x5c]
call esi
push dword [ebp + 0x7c]
push dword [ebp + 0x48]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
push dword [ebp + 0x48]
call esi
cmp dword [ebp + 0x4c], ebx
je 0x4025e1
push dword [ebp + 0x4c]
call esi
xor eax, eax
pop edi
pop esi
pop ebx
add ebp, 0x70
leave
ret