Function at 0x40871a
Capabilities:
Accept command line arguments
Get common file path

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x64
mov eax, dword [0x42d0b4]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov eax, 0x43b9f4
mov esi, ecx
push edi
push eax
mov dword [ebp - 0x64], esi
mov dword [0x431594], eax
call dword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_InitializeCriticalSection]
push dword [0x431594]
call dword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_EnterCriticalSection]
push dword [0x431594]
xor edi, edi
mov dword [0x43158c], edi
call dword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_LeaveCriticalSection]
push 1
push 0x427280
call dword [sym.imp.api_ms_win_core_console_l1_1_0.dll_SetConsoleCtrlHandler]
push 0x43ba10
push 1
call dword [sym.imp.msvcrt.dll__get_osfhandle]
pop ecx
push eax
call dword [sym.imp.api_ms_win_core_console_l1_1_0.dll_GetConsoleMode]
push 0x43ba0c
push edi
call dword [sym.imp.msvcrt.dll__get_osfhandle]
pop ecx
push eax
call dword [sym.imp.api_ms_win_core_console_l1_1_0.dll_GetConsoleMode]
call fcn.0040e250
call fcn.0040a8ef
mov dword [0x431584], eax
call fcn.00408ae3
mov ecx, esi
mov dword [0x431580], eax
call fcn.004081c3
call dword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_GetCommandLineW]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x4087c3
sub eax, edx
mov ecx, 0x2000
sar eax, 1
inc eax
cmp eax, ecx
ja 0x408a84
mov edx, ecx
lea ecx, [ebp - 0x60]
call fcn.00411985
mov esi, dword [ebp - 0x60]
test esi, esi
je 0x408a7c
call dword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_GetCommandLineW]
push eax
mov edx, 0x2000
mov ecx, esi
call fcn.0040f2e0
xor eax, eax
mov ecx, 0x447be0
cmp byte [0x447dec], al
sete al
dec eax
and eax, 0x7ee3
add eax, 0x104
push eax
call fcn.0040e330
test eax, eax
js 0x408a7c
mov ecx, dword [0x447de8]
test ecx, ecx
jne 0x408840
mov ecx, 0x447be0
mov edx, dword [0x447df0]
push edi
call fcn.00408deb
call fcn.00410039
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, di
jne 0x408856
sub ecx, edx
sar ecx, 1
push ecx
mov ecx, dword [ebp - 0x64]
push esi
call fcn.0040a18b
mov eax, dword [0x447de8]
mov edx, 0x447be0
mov ecx, eax
test eax, eax
jne 0x408881
mov ecx, edx
push 0x5c
pop esi
cmp word [ecx], si
mov esi, dword [ebp - 0x60]
jne 0x4088f8
mov ecx, eax
test eax, eax
jne 0x408894
mov ecx, edx
push 0x5c
pop esi
cmp word [ecx + 2], si
mov esi, dword [ebp - 0x60]
jne 0x4088f8
cmp byte [0x44803d], 0
jne 0x4088f8
test eax, eax
jne 0x4088af
mov eax, edx
push eax
push 1
push 0x400023c8
call fcn.00407834
mov eax, dword [0x447de8]
add esp, 0xc
test eax, eax
jne 0x4088cd
mov eax, 0x447be0
push dword [0x447df0]
push eax
call dword [sym.imp.api_ms_win_core_sysinfo_l1_1_0.dll_GetWindowsDirectoryW]
test eax, eax
je 0x408a91
mov ecx, dword [0x447de8]
test ecx, ecx
jne 0x4088f1
mov ecx, 0x447be0
xor edx, edx
call fcn.00408b14
call dword [sym.imp.api_ms_win_core_console_l1_1_0.dll_GetConsoleOutputCP]
push 0x43b9e0
push eax
mov dword [0x431590], eax
call dword [sym.imp.api_ms_win_core_localization_l1_2_0.dll_GetCPInfo]
call fcn.004084c2
push 0x20c
push edi
call dword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_GetProcessHeap]
push eax
call dword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapAlloc]
mov dword [0x431598], eax
test eax, eax
je 0x40894a
push 0x104
push eax
call dword [sym.imp.api_ms_win_core_console_l2_2_0.dll_GetConsoleTitleW]
test eax, eax
jne 0x40894a
mov eax, dword [0x431598]
xor ecx, ecx
mov word [eax], cx
cmp dword [0x435748], edi
jne 0x40899e
xor ecx, ecx
inc ecx
call fcn.00409951
test eax, eax
je 0x40899e
mov cx, word [0x435754]
test cx, cx
jne 0x408999
lea eax, [ebp - 0x5c]
push eax
push 0xfffffffffffffff5
call dword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_GetStdHandle]
push eax
call dword [sym.imp.api_ms_win_core_console_l2_1_0.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x40898d
mov ax, word [ebp - 0x54]
mov word [0x435754], ax
jmp 0x40899e
mov cx, word [0x435754]
test cx, cx
je 0x40899e
call fcn.004282d6
mov eax, dword [ebp - 0x64]
cmp dword [eax + 8], edi
jne 0x408a08
call fcn.00426ef6
lea ecx, [ebp - 0x44]
mov dword [ebp - 0x60], eax
call fcn.00404c48
lea eax, [ebp - 0x44]
push eax
push 1
push 0x2350
call fcn.0040630a
push 0x401f7c
call fcn.00409890
mov eax, dword [ebp - 0x60]
add esp, 0x10
test eax, eax
je 0x4089f4
push eax
push 0x401ef0
call fcn.00409890
push 0x401f7c
call fcn.00409890
add esp, 0xc
jmp 0x4089fe
push edi
push 8
call fcn.00407834
pop ecx
pop ecx
mov eax, dword [ebp - 0x60]
push eax
call dword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_GlobalFree]
push 0x4026f4
call dword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_GetModuleHandleW]
push 0x403468
push eax
mov dword [0x42d0c8], eax
call dword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_GetProcAddress]
push 0x403474
push dword [0x42d0c8]
mov dword [0x4315a8], eax
call dword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_GetProcAddress]
push 0x403488
push dword [0x42d0c8]
call dword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_GetProcAddress]
mov dword [0x4315a4], eax
mov eax, dword [ebp - 0x64]
cmp dword [eax], edi
jne 0x408a61
cmp dword [eax + 4], edi
jne 0x408a61
cmp dword [eax + 8], edi
je 0x408a64
xor edi, edi
inc edi
push esi
call dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete___void__]
pop ecx
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
xor ecx, ebp
pop esi
call fcn.00416ad0
leave
ret
push edi
push 0x2374
jmp 0x408a8a
push edi
push 0x400023df
call fcn.00407834
pop ecx
pop ecx
xor ecx, ecx
inc ecx
call fcn.00417c12
int3