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, 0x2c
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 0x409c6c
mov edx, dword [ebp - 0x10]
mov edi, eax
cmp edx, 1
je 0x409c60
jle 0x409ac8
mov ebx, 1
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], edx
mov esi, ebx
lea esi, [esi]
mov ebx, dword [edi + esi*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 + 0x412b14]
mov dword [0x415dc0], 1
add esi, 1
cmp dword [ebp - 0x14], esi
jne 0x409990
mov eax, dword [ebp - 0x18]
cmp eax, 1
ja 0x409c49
mov dword [esp], 0xbbc
call fcn.00409920
lea esi, [esi]
mov dword [ebp - 0x18], 1
add esi, 1
cmp dword [ebp - 0x14], esi
jne 0x409990
jmp 0x4099f2
mov dword [ebp - 0x18], 2
add esi, 1
cmp dword [ebp - 0x14], esi
jne 0x409990
jmp 0x4099f2
movzx ecx, word [ebx + 4]
test cx, cx
je 0x4099bc
cmp cx, 0x3a
je 0x4099bc
lea esi, [esi]
nop
mov edx, dword [ebp - 0x14]
mov ebx, esi
cmp edx, esi
je 0x4099f2
jle 0x409ac8
cmp dword [ebp - 0x18], 1
je 0x409ae8
mov eax, dword [ebp - 0x18]
cmp eax, 2
je 0x409b20
test eax, eax
jne 0x409cd1
mov esi, dword [edi + ebx*4]
mov dword [esp + 4], 0x412afa
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_lstrcmpW]
sub esp, 8
test eax, eax
jne 0x409b30
mov dword [esp], 0
call dword [sym.imp.ucrtbase.dll___acrt_iob_func]
mov dword [esp], eax
call fcn.0040bd20
add ebx, 1
cmp dword [ebp - 0x10], ebx
jg 0x409a71
lea esi, [esi]
mov dword [esp], edi
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 eax, dword [edi + ebx*4 + 4]
mov edx, dword [edi + ebx*4]
test eax, eax
je 0x409afd
cmp word [eax], 0
jne 0x409c08
mov dword [esp + 8], 1
mov dword [esp + 4], 0
mov dword [esp], edx
call fcn.0040bfd0
add ebx, 2
cmp dword [ebp - 0x10], ebx
jg 0x409ae8
jmp 0x409ac8
mov eax, dword [edi + ebx*4]
mov dword [esp], eax
call fcn.0040be90
jmp 0x409ab9
mov eax, dword [sym.imp.kernel32.dll_SearchPathW]
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
mov dword [ebp - 0x1c], eax
call eax
mov dword [ebp - 0x14], 0
sub esp, 0x18
test eax, eax
mov edx, eax
jle 0x409bb7
lea eax, [eax + eax]
mov dword [ebp - 0x20], edx
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov dword [ebp - 0x14], eax
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], eax
mov edx, dword [ebp - 0x20]
mov dword [esp + 8], 0
mov dword [esp + 4], esi
mov dword [esp], 0
mov dword [esp + 0xc], edx
mov eax, dword [ebp - 0x1c]
call eax
sub esp, 0x18
mov edx, eax
test edx, edx
je 0x409c28
mov dword [esp + 4], 0x412afe
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll__wfopen]
test eax, eax
je 0x409c73
mov dword [esp], eax
mov esi, eax
call fcn.0040bd20
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x409ab9
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_free]
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_fclose]
jmp 0x409ab9
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov dword [esp], edx
call fcn.0040bfd0
jmp 0x409b15
mov dword [esp + 4], esi
mov dword [esp], 0xbbe
call fcn.004098e0
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_free]
jmp 0x409ab9
cmp eax, 2
jne 0x409ac8
mov dword [esp], 0xbbd
call fcn.00409920
nop
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_LocalFree]
sub esp, 4
xor eax, eax
jmp 0x409ad9
mov dword [esp], 0x412b04
call dword [sym.imp.ucrtbase.dll__wperror]
mov dword [esp + 4], esi
mov dword [esp], 0xbbf
call fcn.004098e0
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_free]
jmp 0x409ab9
mov dword [esp + 4], ebx
mov dword [esp], 0xbba
call fcn.00409920
lea esi, [esi]
nop
mov dword [esp], 0xbb9
call fcn.004098e0
call fcn.00409900
mov dword [esp], 0xbc0
call fcn.004098e0
call fcn.00409900
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
push ebp
mov ebp, esp
push ebx
sub esp, 4
mov ebx, dword [ebp + 8]
mov eax, dword [ebx]
mov dword [esp], eax
call dword [0x415de0]
test eax, eax
je 0x409d48
movzx edx, word [eax]
test dx, dx
je 0x409d48
cmp dx, 0x40
je 0x409d60
ja 0x409d38
cmp dx, 0x22
je 0x409d50
ja 0x409d48
cmp dx, 9
je 0x409d2d
cmp dx, 0x20
jne 0x409d48
add eax, 2
jmp 0x409d09
cmp dx, 0x5b
jne 0x409d48
mov dword [ebx + 0x30], 3
add eax, 2
mov ebx, dword [ebp - 4]
leave
ret
mov dword [ebx + 0x30], 6
add eax, 2
mov ebx, dword [ebp - 4]
leave
ret
mov dword [ebx + 0x30], 5
mov ebx, dword [ebp - 4]
leave
ret