Function at 0x405560
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3ec
push edi
mov edi, dword [ebp + 8]
mov dword [edi + 0x3064], 0xf
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
lea ecx, [ebp - 4]
push ecx
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
test eax, eax
jne 0x4055a7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.____Error_call_CommandLineToArgvW__code:__d_n
call fcn.00406020
add esp, 8
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 4], 1
mov dword [ebp + 8], 1
jle 0x4058c5
push ebx
lea ebx, [eax + 4]
push esi
nop dword [eax]
push 0x3e8
lea eax, [ebp - 0x3ec]
push 0
push eax
call fcn.0040f640
mov ecx, dword [ebx]
add esp, 0xc
movzx eax, word [ecx]
cmp eax, 0x2d
je 0x4055e9
cmp eax, 0x2f
jne 0x4058bc
lea eax, [ebp - 0x3ec]
push eax
lea eax, [ecx + 2]
push eax
call fcn.004075c0
add esp, 8
lea ecx, [ebp - 0x3ec]
mov edx, str.NOMUTEX
mov esi, 0xc
nop dword [eax]
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x405630
add ecx, 4
add edx, 4
sub esi, 4
jae 0x405610
mov dword [edi + 0x17c], 1
jmp 0x40589d
lea eax, [ebp - 0x3ec]
cmp dword [eax], 0x4f004c
jne 0x40565c
cmp dword [eax + 4], 0x47
jne 0x40565c
push edi
mov dword [edi + 0x180], 1
call fcn.004061b0
add esp, 4
jmp 0x40589d
lea ecx, [ebp - 0x3ec]
mov edx, str.TARGET
mov esi, 0xa
nop dword [eax]
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x4056c6
add ecx, 4
add edx, 4
sub esi, 4
jae 0x405670
mov ax, word [ecx]
cmp ax, word [edx]
jne 0x4056c6
inc dword [ebp + 8]
add ebx, 4
xor ecx, ecx
mov eax, dword [ebx]
mov al, byte [eax]
lea ecx, [ecx + 1]
mov byte [edi + ecx + 0x18f], al
mov eax, dword [ebx]
cmp word [eax + ecx*2], 0
lea eax, [eax + ecx*2]
jne 0x405693
cmp byte [ecx + edi + 0x18f], 0x5c
je 0x40589d
mov byte [edi + ecx + 0x190], 0x5c
jmp 0x40589d
lea eax, [ebp - 0x3ec]
cmp dword [eax], 0x440049
jne 0x40570d
movzx eax, word [eax + 4]
test ax, ax
jne 0x40570d
inc dword [ebp + 8]
add ebx, 4
xor ecx, ecx
mov eax, dword [ebx]
nop word [eax + eax]
mov al, byte [eax]
lea ecx, [ecx + 1]
mov byte [edi + ecx + 0x294], al
mov eax, dword [ebx]
cmp word [eax + ecx*2], 0
lea eax, [eax + ecx*2]
jne 0x4056f0
jmp 0x40589d
lea ecx, [ebp - 0x3ec]
mov edx, str.CONSOLE
mov esi, 0xc
nop dword [eax]
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x405787
add ecx, 4
add edx, 4
sub esi, 4
jae 0x405720
mov dword [edi + 0x184], 1
call dword [sym.imp.KERNEL32.dll_AllocConsole]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40575b
call esi
push eax
push str.____Error_call_AllocConsole__code:__d_n
call fcn.00406020
add esp, 8
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [edi + 0x39c], eax
cmp eax, 0xffffffff
jne 0x40589d
call esi
push eax
push str.____Error_call_GetStdHandle__code:__d_n
call fcn.00406020
add esp, 8
jmp 0x40589d
lea ecx, [ebp - 0x3ec]
mov edx, str.PROCOFF
mov esi, 0xc
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x4057b7
add ecx, 4
add edx, 4
sub esi, 4
jae 0x405797
mov dword [edi + 0x188], 1
jmp 0x40589d
lea ecx, [ebp - 0x3ec]
mov edx, str.UNCOFF
mov esi, 0xa
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x4057ef
add ecx, 4
add edx, 4
sub esi, 4
jae 0x4057c7
mov ax, word [ecx]
cmp ax, word [edx]
jne 0x4057ef
mov dword [edi + 0x18c], 1
jmp 0x40589d
lea eax, [ebp - 0x3ec]
cmp dword [eax], 0x490053
jne 0x40589d
cmp dword [eax + 4], 0x45005a
jne 0x40589d
movzx eax, word [eax + 8]
test ax, ax
jne 0x40589d
mov eax, dword [ebx + 4]
add ebx, 4
inc dword [ebp + 8]
movzx ecx, word [eax]
add ecx, 0xffffffd0
mov dword [edi + 0x3064], ecx
mov eax, dword [ebx]
movzx eax, word [eax + 2]
test ax, ax
je 0x405878
cmp eax, 0x30
jb 0x4058bc
cmp eax, 0x39
ja 0x4058bc
lea ecx, [ecx + ecx*4]
lea ecx, [ecx - 0x18]
lea ecx, [eax + ecx*2]
mov dword [edi + 0x3064], ecx
mov eax, dword [ebx]
movzx eax, word [eax + 4]
test ax, ax
je 0x405878
cmp eax, 0x30
jb 0x4058bc
cmp eax, 0x39
ja 0x4058bc
lea ecx, [ecx + ecx*4]
lea eax, [eax + ecx*2]
add eax, 0xffffffd0
mov dword [edi + 0x3064], eax
mov eax, dword [edi + 0x3064]
test eax, eax
jg 0x40588e
mov dword [edi + 0x3064], 0xf
jmp 0x40589d
cmp eax, 0x64
jle 0x40589d
mov dword [edi + 0x3064], 0x64
mov eax, dword [ebp + 8]
add ebx, 4
inc eax
mov dword [ebp + 8], eax
cmp eax, dword [ebp - 4]
jl 0x4055c0
pop esi
pop ebx
mov eax, 1
pop edi
mov esp, ebp
pop ebp
ret
pop esi
pop ebx
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret
mov eax, 1
pop edi
mov esp, ebp
pop ebp
ret