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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x60
mov eax, dword [0x4ad240ac]
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 0x4ad16a23
mov eax, 0x4ad24220
push eax
mov dword [0x4ad2419c], eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
call fcn.4ad01a2f
push 1
push 0x4ad1e312
call dword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
call fcn.4ad015ed
call fcn.4ad0528b
push dword [ebp + 0xc]
push esi
call fcn.4ad0550d
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 0x4ad059cd
sub eax, ecx
sar eax, 1
push edi
inc eax
mov edi, 0x2000
cmp eax, edi
ja 0x4ad16a2a
push ebx
call esi
push eax
push edi
mov esi, 0x4ad38600
push esi
call fcn.4ad017fb
push 0
mov ebx, 0x104
push ebx
mov edi, 0x4ad25220
push edi
call fcn.4ad03a9f
call fcn.4ad0546d
mov eax, esi
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x4ad05a17
sub eax, ecx
sar eax, 1
push eax
push esi
push dword [ebp + 0xc]
mov esi, dword [ebp - 0x48]
push esi
call fcn.4ad052a5
cmp word [0x4ad25220], 0x5c
je 0x4ad0b9f3
call dword [sym.imp.KERNEL32.dll_GetConsoleOutputCP]
push 0x4ad24260
push eax
mov dword [0x4ad241b0], eax
call dword [sym.imp.KERNEL32.dll_GetCPInfo]
call fcn.4ad05b4d
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 [0x4ad241a0], eax
cmp eax, edi
je 0x4ad05a8b
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetConsoleTitleW]
test eax, eax
je 0x4ad16a3f
cmp dword [0x4ad240dc], edi
je 0x4ad1070a
cmp dword [esi + 8], edi
je 0x4ad16a4d
push 0x4ad0521c
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x4ad05b3c
push eax
mov dword [0x4ad24094], eax
call esi
push 0x4ad05b28
push dword [0x4ad24094]
mov dword [0x4ad241e4], eax
call esi
push 0x4ad05b10
push dword [0x4ad24094]
mov dword [0x4ad241dc], eax
call esi
mov dword [0x4ad241ec], eax
mov eax, dword [ebp - 0x48]
pop ebx
cmp dword [eax], edi
jne 0x4ad05afd
cmp dword [eax + 4], edi
jne 0x4ad05afd
cmp dword [eax + 8], edi
je 0x4ad16ada
xor eax, eax
inc eax
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.4ad0139d
leave
ret 8
cmp word [0x4ad25222], 0x5c
jne 0x4ad05a41
cmp byte [0x4ad4066c], 0
jne 0x4ad05a41
push edi
push 1
push 0x400023c8
call fcn.4ad0ab8b
add esp, 0xc
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push 1
test eax, eax
je 0x4ad16a3a
push edi
call fcn.4ad0931a
jmp 0x4ad05a41
push 1
call fcn.4ad04a32
test eax, eax
je 0x4ad05a97
cmp word [0x4ad2408a], di
jne 0x4ad10750
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 0x4ad10743
mov ax, word [ebp - 0x58]
mov word [0x4ad2408a], ax
cmp word [0x4ad2408a], di
je 0x4ad05a97
movzx eax, word [0x4ad2408a]
push eax
call fcn.4ad10767
jmp 0x4ad05a97
xor eax, eax
jmp 0x4ad05b01
push 0
push 0x400023df
call fcn.4ad0ab8b
pop ecx
pop ecx
push 1
call fcn.4ad03b69
mov ecx, dword [0x4ad241a0]
mov word [ecx], ax
jmp 0x4ad05a8b
push edi
push 0x4ad16ae4
call fcn.4ad1dfd1
mov ebx, eax
push 0x20
lea eax, [ebp - 0x44]
push eax
call fcn.4ad0cd3f
lea eax, [ebp - 0x44]
push eax
push 1
push 0x2350
call fcn.4ad0a0bd
mov esi, 0x4ad245a8
push esi
call fcn.4ad0735f
add esp, 0x10
cmp ebx, edi
je 0x4ad16a9d
push ebx
push 0x4ad04ca8
call fcn.4ad0735f
push esi
call fcn.4ad0735f
add esp, 0xc
jmp 0x4ad16aa7
push edi
push 8
call fcn.4ad0ab8b
pop ecx
pop ecx
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
cmp byte [0x4ad40638], 0
jne 0x4ad05aa0
cmp byte [0x4ad24081], 0
je 0x4ad05aa0
push edi
push 0x4000239f
call fcn.4ad0a0bd
pop ecx
pop ecx
jmp 0x4ad05aa0
xor eax, eax
jmp 0x4ad05b00