Function at 0x409940
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
lea eax, [ebp - 0x10]
push ebx
sub esp, 0x28
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call dword [sym.imp.shcore.dll_CommandLineToArgvW]
sub esp, 8
test eax, eax
je 0x409c79
mov ecx, dword [ebp - 0x10]
mov esi, eax
cmp ecx, 1
je 0x409c6d
jle 0x409ae1
mov ebx, 1
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], ecx
mov edi, ebx
lea esi, [esi]
mov ebx, dword [esi + edi*4]
movzx ecx, word [ebx]
mov eax, ecx
and eax, 0xfffffffd
cmp ax, 0x2d
jne 0x409a60
movzx eax, word [ebx + 2]
test ax, ax
jne 0x409a40
cmp cx, 0x2d
je 0x409a60
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_towupper]
sub eax, 0x3f
cmp ax, 0x17
ja case.0x4099d5.1
movzx eax, ax
jmp dword [eax*4 + 0x412b34]
mov dword [0x415dc0], 1
add edi, 1
cmp dword [ebp - 0x14], edi
jne 0x409990
cmp dword [ebp - 0x18], 2
je 0x409c61
mov dword [esp], 0xbbc
call fcn.00409920
lea esi, cs:[esi]
mov dword [ebp - 0x18], 1
add edi, 1
cmp dword [ebp - 0x14], edi
jne 0x409990
jmp 0x4099f2
mov dword [ebp - 0x18], 2
add edi, 1
cmp dword [ebp - 0x14], edi
jne 0x409990
jmp 0x4099f2
movzx ecx, word [ebx + 4]
test cx, cx
je 0x4099bc
cmp cx, 0x3a
je 0x4099bc
lea esi, cs:[esi]
nop
mov ecx, dword [ebp - 0x14]
mov ebx, edi
cmp ecx, edi
je 0x4099f2
jle 0x409ae1
cmp dword [ebp - 0x18], 1
lea eax, [edi*4]
mov edi, dword [esi + edi*4]
jne 0x409b00
mov eax, dword [esi + eax + 4]
test eax, eax
je 0x409a8d
cmp word [eax], 0
jne 0x409ac5
mov dword [esp + 8], 1
add ebx, 2
mov dword [esp + 4], 0
mov dword [esp], edi
call fcn.0040bff0
cmp ebx, dword [ebp - 0x10]
jge 0x409ae1
lea eax, [ebx*4]
mov edi, dword [esi + ebx*4]
mov eax, dword [esi + eax + 4]
test eax, eax
je 0x409a8d
cmp word [eax], 0
je 0x409a8d
mov dword [esp + 8], 1
add ebx, 2
mov dword [esp + 4], eax
mov dword [esp], edi
call fcn.0040bff0
cmp ebx, dword [ebp - 0x10]
jl 0x409aad
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_LocalFree]
mov eax, 1
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [ebp - 0x14], esi
mov esi, edi
jmp 0x409b4b
mov dword [esp + 4], 0x412b1a
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_lstrcmpW]
sub esp, 8
test eax, eax
jne 0x409b70
mov dword [esp], 0
call dword [sym.imp.ucrtbase.dll___acrt_iob_func]
mov dword [esp], eax
call fcn.0040bd30
add ebx, 1
cmp ebx, dword [ebp - 0x10]
jge 0x409b61
mov eax, dword [ebp - 0x14]
mov esi, dword [eax + ebx*4]
cmp dword [ebp - 0x18], 2
jne 0x409b10
mov dword [esp], esi
add ebx, 1
call fcn.0040beb0
cmp ebx, dword [ebp - 0x10]
jl 0x409b45
mov esi, dword [ebp - 0x14]
jmp 0x409ae1
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], esi
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_SearchPathW]
sub esp, 0x18
test eax, eax
mov edi, eax
mov dword [ebp - 0x1c], 0
jle 0x409bee
lea eax, [eax + eax]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov dword [ebp - 0x1c], eax
mov dword [esp + 0xc], edi
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], eax
mov dword [esp + 8], 0
mov dword [esp + 4], esi
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_SearchPathW]
sub esp, 0x18
mov edi, eax
test edi, edi
je 0x409c40
mov dword [esp + 4], 0x412b1e
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll__wfopen]
mov edi, eax
test eax, eax
je 0x409cb1
mov dword [esp], eax
call fcn.0040bd30
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x409b3d
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_free]
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_fclose]
jmp 0x409b3d
mov dword [esp + 4], esi
mov dword [esp], 0xbbe
call fcn.004098e0
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_free]
jmp 0x409b3d
mov dword [esp], 0xbbd
call fcn.00409920
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_LocalFree]
sub esp, 4
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 4], ebx
mov dword [esp], 0xbba
call fcn.00409920
lea esi, cs:[esi]
mov dword [esp], 0xbb9
call fcn.004098e0
call fcn.00409900
mov dword [esp], 0x412b24
call dword [sym.imp.ucrtbase.dll__wperror]
mov dword [esp + 4], esi
mov dword [esp], 0xbbf
call fcn.004098e0
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_free]
jmp 0x409b3d