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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x434
mov eax, dword [0x1005008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
xor esi, esi
push esi
push esi
xor ebx, ebx
inc ebx
push ebx
push esi
mov dword [ebp - 0x418], esi
mov dword [ebp - 0x430], esi
mov byte [ebp - 0x419], 0
call dword [sym.imp.KERNEL32.dll_HeapSetInformation]
push esi
push esi
push 0x100
call dword [sym.imp.KERNEL32.dll_SetThreadPreferredUILanguages]
call fcn.0100136f
xor eax, eax
mov word [ebp - 0x20c], ax
lea eax, [ebp - 0x42c]
push eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov dword [ebp - 0x434], eax
cmp eax, esi
jne 0x1002f0a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
call fcn.010014b1
pop ecx
pop ecx
mov eax, ebx
jmp 0x100319b
mov eax, ebx
push edi
mov dword [ebp - 0x424], eax
mov edi, 0x104
cmp dword [ebp - 0x42c], ebx
jbe 0x10030b2
mov ebx, dword [sym.imp.msvcrt.dll__wcsicmp]
mov ecx, dword [ebp - 0x434]
lea esi, [ecx + eax*4]
mov eax, dword [esi]
cmp word [eax], 0x2f
jne 0x1003085
push 0x1001250
push eax
call ebx
pop ecx
pop ecx
test eax, eax
jne 0x1002f7e
cmp dword [ebp - 0x418], eax
je 0x1002f65
cmp dword [ebp - 0x418], fcn.010022da
jne 0x10031a9
mov dword [ebp - 0x418], fcn.010022da
mov dword [ebp - 0x430], 0x100275e
jmp 0x100308c
push 0x1001248
push dword [esi]
call ebx
pop ecx
pop ecx
test eax, eax
jne 0x1002fbe
cmp dword [ebp - 0x418], eax
je 0x1002fa5
cmp dword [ebp - 0x418], fcn.01001b81
jne 0x10031a9
mov dword [ebp - 0x418], fcn.010029b9
mov dword [ebp - 0x430], 0x1002e1c
jmp 0x100308c
push 0x1001240
push dword [esi]
call ebx
pop ecx
pop ecx
test eax, eax
jne 0x1002fd9
mov byte [0x1005023], 1
jmp 0x100308c
push 2
push 0x1001238
push dword [esi]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x1003039
mov byte [0x1005020], 1
push 0x3a
push dword [esi]
call dword [sym.imp.msvcrt.dll_wcschr]
pop ecx
pop ecx
test eax, eax
je 0x100301a
add eax, 2
push eax
push edi
push 0x1005380
call sub.msvcrt.dll_wcscpy_s
add esp, 0xc
jmp 0x100308c
push dword [esi]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp eax, 2
jne 0x10031a9
push 0x1005380
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
jmp 0x100308c
push 0x1001230
push dword [esi]
call ebx
pop ecx
pop ecx
test eax, eax
jne 0x1003051
mov byte [0x1005021], 1
jmp 0x100308c
push 0x1001228
push dword [esi]
call ebx
pop ecx
pop ecx
test eax, eax
jne 0x1003069
mov byte [0x1005022], 1
jmp 0x100308c
push 0x1001220
push dword [esi]
call ebx
pop ecx
pop ecx
test eax, eax
jne 0x10031b8
mov byte [0x1005024], 1
jmp 0x100308c
mov byte [ebp - 0x419], 1
mov eax, dword [ebp - 0x424]
inc eax
mov dword [ebp - 0x424], eax
cmp eax, dword [ebp - 0x42c]
jb 0x1002f2a
xor ebx, ebx
xor esi, esi
inc ebx
cmp dword [ebp - 0x418], esi
jne 0x10030c6
mov dword [ebp - 0x418], fcn.01001b81
mov dword [ebp - 0x430], 0x1001e6c
cmp byte [0x1005020], 0
push 0x1005380
jne 0x10031e2
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
cmp byte [ebp - 0x419], 0
mov dword [ebp - 0x428], esi
jne 0x1003210
lea eax, [ebp - 0x420]
push eax
lea eax, [ebp - 0x20c]
push eax
push edi
push 0x10011d4
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
cmp eax, esi
je 0x1003204
cmp eax, edi
jae 0x1003204
push dword [ebp - 0x420]
lea eax, [ebp - 0x414]
push edi
push eax
call sub.msvcrt.dll_wcscpy_s
mov ecx, dword [ebp - 0x420]
xor eax, eax
add esp, 0xc
cmp dword [ebp - 0x418], 0x1001b81
mov word [ecx], ax
je 0x1003165
push 0x100121c
lea eax, [ebp - 0x20c]
push eax
call dword [ebp - 0x418]
test al, al
jne 0x1003165
mov dword [ebp - 0x428], ebx
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [ebp - 0x418]
test al, al
jne 0x1003183
mov dword [ebp - 0x428], ebx
push 0x1005380
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
call dword [ebp - 0x430]
mov eax, dword [ebp - 0x428]
pop edi
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.010036a9
leave
ret
push 0
push 0x32
call fcn.01001417
pop ecx
jmp 0x10033d4
push 0
push 0x32
call fcn.01001417
mov eax, dword [ebp - 0x434]
mov ecx, dword [ebp - 0x424]
push 0x1001214
push dword [eax + ecx*4]
call ebx
add esp, 0x10
neg eax
sbb eax, eax
neg eax
jmp 0x100319a
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
jne 0x10030df
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x1005380
call fcn.010014b1
pop ecx
jmp 0x100320b
push 0x13
call fcn.01001417
pop ecx
mov eax, ebx
jmp 0x100319a
mov eax, ebx
mov dword [ebp - 0x424], ebx
cmp dword [ebp - 0x42c], ebx
jbe 0x1003183
mov ebx, dword [ebp - 0x434]
lea esi, [ebx + eax*4]
mov eax, dword [esi]
cmp word [eax], 0x2f
je 0x100338e
push 0x1005380
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov eax, dword [esi]
push 0x2e
pop ecx
cmp cx, word [eax]
jne 0x1003296
xor ecx, ecx
cmp cx, word [eax + 2]
jne 0x1003296
lea ecx, [ebp - 0x420]
push ecx
lea ecx, [ebp - 0x20c]
push ecx
mov eax, 0x10011d4
push edi
push eax
mov dword [esi], eax
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
test eax, eax
je 0x10033cd
cmp eax, edi
jae 0x10033cd
mov ecx, dword [ebp - 0x420]
xor eax, eax
mov word [ecx], ax
and dword [ebp - 0x420], eax
jmp 0x100330d
lea ecx, [ebp - 0x420]
push ecx
lea ecx, [ebp - 0x20c]
push ecx
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
test eax, eax
je 0x10033cd
cmp eax, edi
jae 0x10033cd
push 0x3a
push dword [esi]
call dword [sym.imp.msvcrt.dll_wcschr]
pop ecx
pop ecx
test eax, eax
je 0x10032da
sub eax, dword [esi]
and eax, 0xfffffffe
cmp eax, 2
jne 0x10033ac
push dword [esi]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
call ebx
test eax, eax
jle 0x100330d
push dword [esi]
call ebx
mov ecx, dword [esi]
push 0x2e
pop edx
cmp dx, word [ecx + eax*2 - 2]
jne 0x100330d
push 0x100115c
lea eax, [ebp - 0x20c]
push edi
push eax
call sub.msvcrt.dll_wcscat_s
add esp, 0xc
lea eax, [ebp - 0x20c]
push eax
call fcn.010015e4
test al, al
je 0x1003339
push 0x10011d0
lea eax, [ebp - 0x20c]
push edi
push eax
call sub.msvcrt.dll_wcscat_s
add esp, 0xc
and dword [ebp - 0x420], 0
cmp dword [ebp - 0x420], 0
je 0x1003365
push dword [ebp - 0x420]
lea eax, [ebp - 0x414]
push edi
push eax
call sub.msvcrt.dll_wcscpy_s
mov ecx, dword [ebp - 0x420]
add esp, 0xc
xor eax, eax
mov word [ecx], ax
jmp 0x100336e
xor eax, eax
mov word [ebp - 0x414], ax
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [ebp - 0x418]
test al, al
jne 0x100338e
cmp byte [0x1005021], al
je 0x10033be
mov eax, dword [ebp - 0x424]
inc eax
mov dword [ebp - 0x424], eax
cmp eax, dword [ebp - 0x42c]
jb 0x1003224
jmp 0x1003183
mov eax, dword [ebp - 0x424]
push dword [ebx + eax*4]
push 0x19
call fcn.01001417
pop ecx
pop ecx
mov dword [ebp - 0x428], 1
jmp 0x1003183
push 0x13
call fcn.01001417
xor eax, eax
pop ecx
inc eax
jmp 0x100319a