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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x60
mov eax, dword [0x4a2340ac]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 0xc], 3
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x48], esi
jl 0x4a2269ff
mov eax, 0x4a234220
push eax
mov dword [str._BJ], eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
call fcn.4a211e6c
push 1
push 0x4a22e72a
call dword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
call fcn.4a211605
call fcn.4a217af3
push dword [ebp + 0xc]
push esi
call fcn.4a217e13
mov esi, dword [sym.imp.KERNEL32.dll_GetCommandLineW]
call esi
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x4a218547
sub eax, ecx
sar eax, 1
push edi
inc eax
mov edi, 0x2000
cmp eax, edi
ja 0x4a226a06
push ebx
call esi
push eax
push edi
mov esi, 0x4a248640
push esi
call fcn.4a21185a
push 0
mov ebx, 0x104
push ebx
mov edi, 0x4a235260
push edi
call fcn.4a212c56
call fcn.4a2186c9
mov eax, esi
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x4a218591
sub eax, ecx
sar eax, 1
push eax
push esi
push dword [ebp + 0xc]
mov esi, dword [ebp - 0x48]
push esi
call fcn.4a218b31
cmp word [0x4a235260], 0x5c
je 0x4a21c16f
call dword [sym.imp.KERNEL32.dll_GetConsoleOutputCP]
push 0x4a234260
push eax
mov dword [0x4a2341b8], eax
call dword [sym.imp.KERNEL32.dll_GetCPInfo]
call fcn.4a2188d9
push 0x20c
xor edi, edi
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [0x4a2341a8], eax
cmp eax, edi
je 0x4a218605
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetConsoleTitleW]
test eax, eax
je 0x4a226a1b
cmp dword [0x4a2340e4], edi
je 0x4a220942
cmp dword [esi + 8], edi
je 0x4a226a29
push 0x4a2184c4
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x4a2186b8
push eax
mov dword [0x4a234094], eax
call esi
push 0x4a2186a4
push dword [0x4a234094]
mov dword [0x4a2341ec], eax
call esi
push 0x4a21868c
push dword [0x4a234094]
mov dword [0x4a2341e4], eax
call esi
mov dword [0x4a2341f4], eax
mov eax, dword [ebp - 0x48]
pop ebx
cmp dword [eax], edi
jne 0x4a218677
cmp dword [eax + 4], edi
jne 0x4a218677
cmp dword [eax + 8], edi
je 0x4a226ab6
xor eax, eax
inc eax
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.4a2113a9
leave
ret 8
cmp word [0x4a235262], 0x5c
jne 0x4a2185bb
cmp byte [0x4a2506b0], 0
jne 0x4a2185bb
push edi
push 1
push 0x400023c8
call fcn.4a216d44
add esp, 0xc
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push 1
test eax, eax
je 0x4a226a16
push edi
call fcn.4a216c78
jmp 0x4a2185bb
push 1
call fcn.4a214490
test eax, eax
je 0x4a218611
cmp word [0x4a23408a], di
jne 0x4a220988
lea eax, [ebp - 0x60]
push eax
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x4a22097b
mov ax, word [ebp - 0x58]
mov word [0x4a23408a], ax
cmp word [0x4a23408a], di
je 0x4a218611
movzx eax, word [0x4a23408a]
push eax
call fcn.4a220af9
jmp 0x4a218611
xor eax, eax
jmp 0x4a21867b
push 0
push 0x400023df
call fcn.4a216d44
pop ecx
pop ecx
push 1
call fcn.4a2172e9
mov ecx, dword [0x4a2341a8]
mov word [ecx], ax
jmp 0x4a218605
push edi
push 0x4a226ac0
call fcn.4a22e3e9
mov ebx, eax
push 0x20
lea eax, [ebp - 0x44]
push eax
call fcn.4a21d3b3
lea eax, [ebp - 0x44]
push eax
push 1
push 0x2350
call fcn.4a2199e1
mov esi, 0x4a2345a8
push esi
call fcn.4a2158f3
add esp, 0x10
cmp ebx, edi
je 0x4a226a79
push ebx
push 0x4a212cb4
call fcn.4a2158f3
push esi
call fcn.4a2158f3
add esp, 0xc
jmp 0x4a226a83
push edi
push 8
call fcn.4a216d44
pop ecx
pop ecx
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
cmp byte [0x4a250670], 0
jne 0x4a21861a
cmp byte [0x4a234081], 0
je 0x4a21861a
push edi
push 0x4000239f
call fcn.4a2199e1
pop ecx
pop ecx
jmp 0x4a21861a
xor eax, eax
jmp 0x4a21867a