Function at 0x1002941
Capabilities:
Accept command line arguments
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x430
and byte [ebp - 5], 0
push esi
xor esi, esi
mov dword [ebp - 4], esi
mov dword [ebp - 0x1c], esi
call fcn.0100129d
lea eax, [ebp - 0x14]
push eax
mov word [ebp - 0x228], si
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
cmp eax, esi
mov dword [ebp - 0x18], eax
jne 0x1002992
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
call fcn.0100141f
pop ecx
xor eax, eax
pop ecx
inc eax
jmp 0x1002d6f
push ebx
xor ebx, ebx
inc ebx
cmp dword [ebp - 0x14], ebx
push edi
jbe 0x1002afb
mov edi, dword [sym.imp.msvcrt.dll__wcsicmp]
mov eax, dword [ebp - 0x18]
lea esi, [eax + ebx*4]
mov eax, dword [esi]
cmp word [eax], 0x2f
jne 0x1002ae7
push 0x1001208
push eax
call edi
test eax, eax
pop ecx
pop ecx
jne 0x10029eb
cmp dword [ebp - 4], eax
je 0x10029d8
cmp dword [ebp - 4], fcn.01001ff5
jne 0x1002ba7
mov dword [ebp - 4], fcn.01001ff5
mov dword [ebp - 0x1c], 0x1002389
jmp 0x1002aeb
push 0x1001200
push dword [esi]
call edi
test eax, eax
pop ecx
pop ecx
jne 0x1002a1f
cmp dword [ebp - 4], eax
je 0x1002a0c
cmp dword [ebp - 4], fcn.010019d4
jne 0x1002ba7
mov dword [ebp - 4], fcn.01002589
mov dword [ebp - 0x1c], 0x1002900
jmp 0x1002aeb
push 0x10011f8
push dword [esi]
call edi
test eax, eax
pop ecx
pop ecx
jne 0x1002a3a
mov byte [0x1004024], 1
jmp 0x1002aeb
push 2
push 0x10011f0
push dword [esi]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x1002a9b
mov byte [0x1004020], 1
push 0x3a
push dword [esi]
call dword [sym.imp.msvcrt.dll_wcschr]
test eax, eax
pop ecx
pop ecx
je 0x1002a78
add eax, 2
push eax
push 0x1004040
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
jmp 0x1002aeb
push dword [esi]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp eax, 2
jne 0x1002ba7
push 0x1004040
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
jmp 0x1002aeb
push 0x10011e8
push dword [esi]
call edi
test eax, eax
pop ecx
pop ecx
jne 0x1002ab3
mov byte [0x1004021], 1
jmp 0x1002aeb
push 0x10011e0
push dword [esi]
call edi
test eax, eax
pop ecx
pop ecx
jne 0x1002acb
mov byte [0x1004023], 1
jmp 0x1002aeb
push 0x10011d8
push dword [esi]
call edi
test eax, eax
pop ecx
pop ecx
jne 0x1002bba
mov byte [0x1004025], 1
jmp 0x1002aeb
mov byte [ebp - 5], 1
inc ebx
cmp ebx, dword [ebp - 0x14]
jb 0x10029a6
cmp dword [ebp - 4], 0
jne 0x1002b09
mov dword [ebp - 4], fcn.010019d4
mov dword [ebp - 0x1c], 0x1001c07
cmp byte [0x1004020], 0
push 0x1004040
jne 0x1002bde
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
and dword [ebp - 0x10], 0
cmp byte [ebp - 5], 0
jne 0x1002bff
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x228]
push eax
push 0x104
push 0x100118c
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
push dword [ebp - 0xc]
lea eax, [ebp - 0x430]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov eax, dword [ebp - 0xc]
and word [eax], 0
cmp dword [ebp - 4], 0x10019d4
je 0x1002b89
push 0x10011d4
lea eax, [ebp - 0x228]
push eax
call dword [ebp - 4]
test al, al
jne 0x1002b89
mov dword [ebp - 0x10], 1
lea eax, [ebp - 0x430]
push eax
lea eax, [ebp - 0x228]
push eax
call dword [ebp - 4]
test al, al
jne 0x1002d5c
jmp 0x1002d55
push 0
push 0x32
call fcn.01001396
pop ecx
xor eax, eax
pop ecx
inc eax
jmp 0x1002d6d
push 0
push 0x32
call fcn.01001396
mov eax, dword [ebp - 0x18]
push 0x10011cc
push dword [eax + ebx*4]
call edi
add esp, 0x10
neg eax
sbb eax, eax
neg eax
jmp 0x1002d6d
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
jne 0x1002b26
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x1004040
call fcn.0100141f
jmp 0x1002bb0
xor eax, eax
inc eax
cmp dword [ebp - 0x14], eax
mov dword [ebp - 0x20], eax
jbe 0x1002d5c
mov edi, dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
mov ebx, 0x100118c
mov ecx, dword [ebp - 0x18]
lea esi, [ecx + eax*4]
mov eax, dword [esi]
cmp word [eax], 0x2f
je 0x1002d31
push 0x1004040
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov eax, dword [esi]
cmp word [eax], 0x2e
jne 0x1002c67
cmp word [eax + 2], 0
jne 0x1002c67
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x228]
push eax
push 0x104
push ebx
mov dword [esi], ebx
call edi
mov eax, dword [ebp - 0xc]
and word [eax], 0
and dword [ebp - 0xc], 0
jmp 0x1002cc8
lea ecx, [ebp - 0xc]
push ecx
lea ecx, [ebp - 0x228]
push ecx
push 0x104
push eax
call edi
push 0x3a
push dword [esi]
call dword [sym.imp.msvcrt.dll_wcschr]
test eax, eax
pop ecx
pop ecx
je 0x1002c98
sub eax, dword [esi]
and eax, 0xfffffffe
cmp eax, 2
jne 0x1002d43
push dword [esi]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
jle 0x1002cc8
push dword [esi]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [esi]
cmp word [ecx + eax*2 - 2], 0x2e
jne 0x1002cc8
push 0x100112c
lea eax, [ebp - 0x228]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [ebp - 0x228]
push eax
call fcn.0100153e
test al, al
je 0x1002cee
push 0x1001188
lea eax, [ebp - 0x228]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
and dword [ebp - 0xc], 0
xor esi, esi
cmp dword [ebp - 0xc], esi
je 0x1002d0d
push dword [ebp - 0xc]
lea eax, [ebp - 0x430]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov eax, dword [ebp - 0xc]
mov word [eax], si
jmp 0x1002d14
mov word [ebp - 0x430], si
lea eax, [ebp - 0x430]
push eax
lea eax, [ebp - 0x228]
push eax
call dword [ebp - 4]
test al, al
jne 0x1002d31
cmp byte [0x1004021], al
je 0x1002d55
mov eax, dword [ebp - 0x20]
inc eax
cmp eax, dword [ebp - 0x14]
mov dword [ebp - 0x20], eax
jb 0x1002c19
jmp 0x1002d5c
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x20]
push dword [eax + ecx*4]
push 0x19
call fcn.01001396
pop ecx
pop ecx
mov dword [ebp - 0x10], 1
push 0x1004040
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
call dword [ebp - 0x1c]
mov eax, dword [ebp - 0x10]
pop edi
pop ebx
pop esi
leave
ret