Function at 0x1004f1f0
Capabilities:
Accept command line arguments
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x1007b00c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0x10]
xor ebx, ebx
mov dword [ebp - 0xc], eax
mov esi, edx
mov dword [ebp - 0x18], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0x10], 0
test edi, edi
je 0x1004f649
test eax, eax
je 0x1004f649
call fcn.1004f160
test eax, eax
jne 0x1004f606
push edi
call dword [sym.imp.SHLWAPI.dll_PathIsUNCW]
test eax, eax
jne 0x1004f606
push eax
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov esi, eax
cmp esi, 0x8000
jbe 0x1004f27e
xor esi, esi
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1005b6db
mov esp, ebp
pop ebp
ret
mov edx, 2
test esi, esi
je 0x1004f2df
xor ecx, ecx
lea eax, [esi + 1]
mul edx
push 0x1007da74
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.1005be25
mov ecx, eax
add esp, 8
mov dword [ebp - 0x10], ecx
test ecx, ecx
je 0x1004f269
lea eax, [esi*2 + 2]
push eax
push 0
push ecx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
push esi
push dword [ebp - 0x10]
push edi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x1004f317
cmp eax, esi
ja 0x1004f317
mov eax, dword [ebp - 0x10]
mov edx, 2
mov dword [ebp - 0x14], eax
jmp 0x1004f2f5
mov esi, edi
mov dword [ebp - 0x14], edi
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, edx
test ax, ax
jne 0x1004f2e7
sub esi, ecx
sar esi, 1
xor ecx, ecx
lea eax, [esi + 1]
mul edx
push 0x1007da74
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.1005be25
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x1004f31e
xor esi, esi
jmp 0x1004f5c8
lea eax, [esi*2 + 2]
push eax
push 0
push ebx
call sub.VCRUNTIME140.dll_memset
mov ecx, dword [ebp - 0x14]
mov edx, ebx
push esi
call fcn.1004e5d0
add esp, 0x10
test eax, eax
je 0x1004f455
mov ecx, ebx
call fcn.1004f160
test eax, eax
je 0x1004f385
mov ecx, ebx
mov esi, 1
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1004f360
sub ecx, edx
sar ecx, 1
push ecx
push ebx
push dword [ebp + 0x14]
push dword [ebp - 0xc]
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy_s]
add esp, 0x10
jmp 0x1004f5c8
mov edi, dword [ebp - 0x1c]
test edi, edi
je 0x1004f3f1
cmp dword [ebp + 0xc], 0
mov dword [ebp - 0x14], 0
jle 0x1004f3f1
nop dword [eax]
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1004f3a5
sub ecx, edx
sar ecx, 1
push ecx
push edi
push ebx
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x1004f436
mov ecx, edi
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1004f3d0
mov eax, dword [ebp - 0x14]
sub ecx, edx
sar ecx, 1
inc eax
mov dword [ebp - 0x14], eax
lea edi, [edi + ecx*2]
add edi, 2
cmp eax, dword [ebp + 0xc]
jl 0x1004f3a0
lea edi, [esi + 1]
push ebx
call dword [sym.imp.SHLWAPI.dll_PathParseIconLocationW]
mov ecx, ebx
call fcn.1004f160
test eax, eax
je 0x1004f467
mov ecx, ebx
mov esi, 1
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1004f410
mov eax, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy_s]
sub ecx, edx
sar ecx, 1
push ecx
push ebx
push dword [ebp + 0x14]
push dword [ebp - 0xc]
call eax
add esp, 0x10
jmp 0x1004f5c8
mov ecx, dword [ebp + 0x14]
mov esi, 1
lea eax, [ecx - 1]
push eax
push ebx
push ecx
push dword [ebp - 0xc]
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy_s]
add esp, 0x10
jmp 0x1004f5c8
push esi
push edi
lea edi, [esi + 1]
push edi
push ebx
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy_s]
add esp, 0x10
jmp 0x1004f3f4
mov eax, dword [ebp - 0x10]
test eax, eax
jne 0x1004f49c
xor ecx, ecx
mov eax, edi
mov edx, 2
mul edx
push 0x1007da74
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.1005be25
add esp, 8
mov dword [ebp - 0x10], eax
test eax, eax
jne 0x1004f49c
xor esi, esi
jmp 0x1004f5d8
lea ecx, [esi*2 + 2]
push ecx
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov eax, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy_s]
push esi
mov esi, dword [ebp - 0x10]
push ebx
push edi
push esi
call eax
add esp, 0x1c
push esi
call dword [sym.imp.SHLWAPI.dll_PathRemoveArgsW]
mov ecx, esi
call fcn.1004f160
test eax, eax
je 0x1004f505
mov edi, dword [ebp - 0x10]
mov esi, 1
mov ecx, edi
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1004f4e0
sub ecx, edx
sar ecx, 1
push ecx
push edi
push dword [ebp + 0x14]
push dword [ebp - 0xc]
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy_s]
add esp, 0x10
jmp 0x1004f5c8
lea eax, [ebp - 8]
push eax
push ebx
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
xor edi, edi
mov dword [ebp - 0x18], eax
cmp dword [ebp - 8], edi
jle 0x1004f597
mov ecx, dword [ebp + 0x14]
lea eax, [ecx + ecx]
push eax
push 0
push dword [ebp - 0xc]
call sub.VCRUNTIME140.dll_memset
mov eax, dword [ebp - 0x18]
add esp, 0xc
mov ecx, dword [eax + edi*4]
mov esi, ecx
lea edx, [esi + 2]
nop dword [eax]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x1004f540
push ecx
sub esi, edx
push ebx
sar esi, 1
call dword [sym.imp.VCRUNTIME140.dll_wcsstr]
sub eax, ebx
add esp, 8
sar eax, 1
add eax, esi
mov esi, dword [ebp + 0x14]
cmp eax, esi
ja 0x1004f59a
push eax
push ebx
lea eax, [esi + 1]
push eax
push dword [ebp - 0xc]
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy_s]
mov ecx, dword [ebp - 0xc]
add esp, 0x10
call fcn.1004f160
test eax, eax
jne 0x1004f590
inc edi
lea eax, [esi + esi]
cmp edi, dword [ebp - 8]
jl 0x1004f520
jmp 0x1004f59a
mov esi, 1
jmp 0x1004f5c8
mov esi, dword [ebp + 0x14]
mov edi, dword [ebp - 0xc]
lea eax, [esi + esi]
push eax
push 0
push edi
call sub.VCRUNTIME140.dll_memset
mov eax, dword [ebp - 0x18]
mov edx, edi
push esi
mov ecx, dword [eax]
call fcn.1004e940
add esp, 0x10
mov ecx, 1
test eax, eax
mov esi, 0
cmovne esi, ecx
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x1004f5d8
push eax
call fcn.1005be17
add esp, 4
test ebx, ebx
je 0x1004f5e5
push ebx
call fcn.1005be17
add esp, 4
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x1004f5f3
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1005b6db
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0x14]
cmp eax, esi
jbe 0x1004f634
push esi
push edi
push eax
push dword [ebp - 0xc]
mov ebx, 1
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy_s]
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1005b6db
mov esp, ebp
pop ebp
ret
pop edi
xor ebx, ebx
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1005b6db
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1005b6db
mov esp, ebp
pop ebp
ret