Function at 0x4ad047a6
Capabilities:
Accept command line arguments
Get common file path
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x60
mov eax, dword [0x4ad33b78]
push ebx
mov ebx, dword [ebp + 8]
push esi
mov dword [ebp - 4], eax
mov eax, 0x4ad348a0
push edi
push eax
mov dword [ebp - 0x48], ebx
mov dword [0x4ad2fa78], eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
call fcn.4ad01f01
push 1
push 0x4ad0c5d8
call dword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
call fcn.4ad01688
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
push ebx
mov dword [0x4ad2b0d0], eax
call fcn.4ad049ab
mov edi, dword [sym.imp.KERNEL32.dll_GetCommandLineW]
call edi
test eax, eax
mov esi, 0x4ad250a0
je 0x4ad04815
call edi
push eax
push esi
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
push esi
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
push eax
push esi
push esi
call fcn.4ad022ab
push 0
mov edi, 0x4ad34400
push edi
call fcn.4ad01555
call fcn.4ad053b7
push esi
push ebx
call fcn.4ad051e7
cmp word [0x4ad34400], 0x5c
je 0x4ad14088
call dword [sym.imp.KERNEL32.dll_GetConsoleOutputCP]
push 0x4ad33ba0
push eax
mov dword [0x4ad2b9ec], eax
call dword [sym.imp.KERNEL32.dll_GetCPInfo]
call fcn.4ad054a4
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov ebx, 0x20c
push ebx
push 0
call esi
mov edi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
call edi
push ebx
xor ebx, ebx
push ebx
mov dword [0x4ad2fa80], eax
call esi
push eax
call edi
cmp dword [0x4ad2fa80], ebx
mov dword [0x4ad2fa84], eax
je 0x4ad048d1
cmp eax, ebx
je 0x4ad048d1
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetConsoleTitleW]
test eax, eax
je 0x4ad140cc
mov ecx, dword [0x4ad2fa80]
cmp ecx, ebx
je 0x4ad048d1
mov eax, dword [0x4ad2fa84]
cmp eax, ebx
je 0x4ad048d1
push eax
push ecx
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
cmp dword [0x4ad2fabc], ebx
je 0x4ad0dfe1
mov edi, dword [ebp - 0x48]
cmp dword [edi + 8], ebx
je 0x4ad0e0ae
push 0x4ad0498c
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x4ad04980
push eax
mov dword [str.j_fh_], eax
call esi
push 0x4ad0496c
push dword [str.j_fh_]
mov dword [0x4ad2fa6c], eax
call esi
push 0x4ad04954
push dword [str.j_fh_]
mov dword [0x4ad2fa70], eax
call esi
mov dword [0x4ad2fa74], eax
cmp dword [edi], ebx
jne 0x4ad04942
cmp dword [edi + 4], ebx
jne 0x4ad04942
cmp dword [edi + 8], ebx
je 0x4ad0dfb9
xor eax, eax
inc eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.4ad01305
leave
ret 4
xor eax, eax
jmp 0x4ad04945
push 1
call fcn.4ad05b51
test eax, eax
je 0x4ad048dd
cmp word [0x4ad2fa88], bx
jne 0x4ad0e027
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 0x4ad0e01a
mov ax, word [ebp - 0x58]
mov word [0x4ad2fa88], ax
cmp word [0x4ad2fa88], bx
je 0x4ad048dd
xor eax, eax
mov ax, word [0x4ad2fa88]
push eax
call fcn.4ad0e03f
jmp 0x4ad048dd
push 0x20
lea eax, [ebp - 0x44]
push eax
call fcn.4ad0e0f8
lea eax, [ebp - 0x44]
push eax
push 1
push 0x2350
call fcn.4ad069f4
push 0x4ad3cba0
call fcn.4ad05e0c
push ebx
push 0x2334
call fcn.4ad069f4
add esp, 0x18
cmp byte [0x4ad3485c], 0
je 0x4ad140e1
jmp 0x4ad048e9
cmp word [0x4ad34402], 0x5c
jne 0x4ad0484c
cmp byte [0x4ad3d9fc], 0
jne 0x4ad0484c
push edi
push 1
push 0x23c8
call fcn.4ad0606f
add esp, 0xc
push 0x104
push edi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push 1
push edi
call fcn.4ad05efa
jmp 0x4ad0484c
mov eax, dword [0x4ad2fa80]
mov word [eax], bx
mov eax, dword [0x4ad2fa84]
mov word [eax], bx
jmp 0x4ad048d1
cmp byte [0x4ad2fa64], 0
je 0x4ad048e9
push ebx
push 0x239f
call fcn.4ad069f4
pop ecx
pop ecx
jmp 0x4ad048e9