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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x444
mov eax, dword [0x100c02c]
push esi
xor esi, esi
mov dword [ebp - 4], eax
mov dword [ebp - 0x41c], esi
mov dword [ebp - 0x428], esi
call fcn.01001830
lea eax, [ebp - 0x42c]
push eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
cmp eax, esi
mov dword [ebp - 0x424], eax
jne 0x1005057
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
call fcn.010019e8
pop ecx
pop ecx
jmp 0x100581c
xor eax, eax
inc eax
cmp dword [ebp - 0x42c], eax
push ebx
mov ebx, dword [sym.imp.msvcrt.dll_wcschr]
push edi
mov dword [ebp - 0x418], eax
jbe 0x10052f1
mov edi, dword [sym.imp.msvcrt.dll__wcsicmp]
mov eax, dword [ebp - 0x424]
mov ecx, dword [ebp - 0x418]
lea esi, [eax + ecx*4]
mov eax, dword [esi]
cmp word [eax], 0x2f
jne 0x10052d2
push 0x100159c
push eax
call edi
test eax, eax
pop ecx
pop ecx
jne 0x10050d4
cmp dword [ebp - 0x41c], eax
je 0x10050bb
cmp dword [ebp - 0x41c], fcn.01002314
jne 0x100531d
mov dword [ebp - 0x41c], fcn.01002314
mov dword [ebp - 0x428], 0x100265f
jmp 0x10052d9
push 0x1001594
push dword [esi]
call edi
test eax, eax
pop ecx
pop ecx
jne 0x1005114
cmp dword [ebp - 0x41c], eax
je 0x10050fb
cmp dword [ebp - 0x41c], fcn.01001ed7
jne 0x100531d
mov dword [ebp - 0x41c], fcn.010027f4
mov dword [ebp - 0x428], 0x1002b11
jmp 0x10052d9
push 0x100158c
push dword [esi]
call edi
test eax, eax
pop ecx
pop ecx
jne 0x100512f
mov byte [0x100c06e], 1
jmp 0x10052d9
push 0x1001584
push dword [esi]
call edi
test eax, eax
pop ecx
pop ecx
jne 0x100514a
mov byte [0x100c06c], 1
jmp 0x10052d9
push 0x100157c
push dword [esi]
call edi
test eax, eax
pop ecx
pop ecx
jne 0x1005165
mov byte [0x100c06f], 1
jmp 0x10052d9
push 0x1001574
push dword [esi]
call edi
test eax, eax
pop ecx
pop ecx
jne 0x1005180
mov byte [0x100c070], 1
jmp 0x10052d9
push 0x100156c
push dword [esi]
call edi
test eax, eax
pop ecx
pop ecx
jne 0x100519b
mov byte [0x100c071], 1
jmp 0x10052d9
push 0x1001564
push dword [esi]
call edi
test eax, eax
pop ecx
pop ecx
jne 0x10051b6
mov byte [0x100c06d], 1
jmp 0x10052d9
push 2
push 0x100155c
push dword [esi]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x10051f7
mov byte [0x100c068], 1
push 0x3a
push dword [esi]
call ebx
test eax, eax
pop ecx
pop ecx
je 0x100531d
lea esi, [eax + 2]
push esi
call dword [sym.imp.msvcrt.dll_wcslen]
cmp eax, 0x101
jmp 0x1005283
push 0x1001554
push dword [esi]
call edi
test eax, eax
pop ecx
pop ecx
jne 0x1005212
mov byte [0x100c069], 1
jmp 0x10052d9
push 0x100154c
push dword [esi]
call edi
test eax, eax
pop ecx
pop ecx
jne 0x100522d
mov byte [0x100c06b], 1
jmp 0x10052d9
push 2
push 0x1001544
push dword [esi]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
je 0x1005337
push 2
push 0x100153c
push dword [esi]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x1005298
mov byte [0x100c073], 1
push 0x3a
push dword [esi]
call ebx
test eax, eax
pop ecx
pop ecx
je 0x100531d
lea esi, [eax + 2]
push esi
call dword [sym.imp.msvcrt.dll_wcslen]
cmp eax, 0xff
pop ecx
ja 0x100532e
push esi
push 0x100c240
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
jmp 0x10052d9
push 2
push 0x1001534
push dword [esi]
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x100531d
mov byte [0x100c072], 1
push 0x3a
push dword [esi]
call ebx
test eax, eax
pop ecx
pop ecx
je 0x100531d
lea esi, [eax + 2]
push esi
call dword [sym.imp.msvcrt.dll_wcslen]
cmp eax, 0x103
jmp 0x1005283
mov byte [0x100c06a], 1
inc dword [ebp - 0x418]
mov eax, dword [ebp - 0x418]
cmp eax, dword [ebp - 0x42c]
jb 0x100507a
mov edi, 0x104
cmp byte [0x100c06f], 0
je 0x10053d3
push 0
call dword [sym.imp.ADVAPI32.dll_SetUserFileEncryptionKey]
test eax, eax
jne 0x1005625
call fcn.01002c76
jmp 0x100581a
push 0
push 0x800006fe
call fcn.0100187f
jmp 0x1005722
push 0x6f
push 0
jmp 0x100571d
mov eax, dword [ebp - 0x424]
mov ecx, dword [ebp - 0x418]
and word [ebp - 0x20c], 0
and word [ebp - 0x414], 0
mov ebx, dword [sym.imp.msvcrt.dll_wcslen]
lea esi, [eax + ecx*4]
mov byte [0x100c074], 1
push dword [esi]
call ebx
cmp eax, 3
pop ecx
jbe 0x1005395
mov ecx, dword [esi]
cmp word [ecx + 4], 0x3a
jne 0x1005395
add eax, 0xfffffffd
mov edi, 0x104
add ecx, 6
cmp eax, edi
push ecx
jae 0x10053ba
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
jmp 0x100539a
mov edi, 0x104
mov eax, dword [ebp - 0x418]
inc eax
cmp eax, dword [ebp - 0x42c]
jae 0x10052f1
push dword [esi + 4]
call ebx
cmp eax, edi
pop ecx
push dword [esi + 4]
jb 0x10053c1
push 0x1b
jmp 0x1005324
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
jmp 0x10052f6
cmp byte [0x100c070], 0
je 0x10053ee
call fcn.010030be
test eax, eax
je 0x100581a
jmp 0x100562b
cmp byte [0x100c073], 0
je 0x1005406
push 0x100c240
call fcn.01003aad
jmp 0x100581a
cmp byte [0x100c074], 0
je 0x1005424
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x414]
push eax
call fcn.01004a98
jmp 0x10053e1
cmp byte [0x100c072], 0
je 0x1005527
lea eax, [ebp - 0x416]
mov dword [ebp - 0x438], eax
lea eax, [ebp - 0x415]
xor ebx, ebx
mov byte [ebp - 0x416], 0
mov byte [ebp - 0x415], 0xff
mov dword [ebp - 0x444], 0x2c
mov dword [ebp - 0x440], 0x2d
mov dword [ebp - 0x43c], 0x2e
mov dword [ebp - 0x434], eax
mov dword [ebp - 0x430], ebx
call fcn.01004952
test eax, eax
jne 0x1005491
push 0x47e
push ebx
jmp 0x100571d
push ebx
push 0x2b
call fcn.0100187f
pop ecx
pop ecx
mov esi, 0x100cc80
push dword [ebp + ebx - 0x438]
push 0x80000
push esi
call fcn.01003d83
mov edi, eax
test edi, edi
jne 0x100551b
push dword [ebp + ebx - 0x444]
lea eax, [ebp - 0x428]
push eax
call fcn.01001bf2
test eax, eax
pop ecx
pop ecx
jne 0x10054ec
push dword [ebp - 0x428]
push 0x2a
call fcn.0100187f
pop ecx
pop ecx
push dword [ebp - 0x428]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push 0x100c240
call fcn.010045a6
push 0x1001530
mov edi, eax
call dword [sym.imp.msvcrt.dll_printf]
pop ecx
push esi
call fcn.01003f29
test edi, edi
jne 0x1005521
add ebx, 4
cmp ebx, 0xc
jb 0x10054a0
jmp 0x100581a
push esi
call fcn.01003f29
push edi
jmp 0x1005330
cmp dword [ebp - 0x41c], 0
jne 0x1005544
mov dword [ebp - 0x41c], fcn.01001ed7
mov dword [ebp - 0x428], 0x1002171
cmp byte [0x100c06a], 0
jne 0x1005608
cmp byte [0x100c068], 0
je 0x1005593
cmp dword [ebp - 0x41c], fcn.01001ed7
je 0x1005576
push 0x100152c
push 0x100c240
call dword [ebp - 0x41c]
mov esi, 0x100c240
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
jne 0x10055ab
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
jmp 0x100571d
push 0x100c240
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
xor esi, esi
cmp eax, esi
je 0x1005586
cmp eax, edi
jb 0x10055ad
jmp 0x10055cf
xor esi, esi
lea eax, [ebp - 0x420]
push eax
lea eax, [ebp - 0x20c]
push eax
push edi
push 0x1001314
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
cmp eax, esi
je 0x1005586
cmp eax, edi
jb 0x10055d3
push 0x6f
jmp 0x100558d
push dword [ebp - 0x420]
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov eax, dword [ebp - 0x420]
mov word [eax], si
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [ebp - 0x41c]
jmp 0x1005809
cmp byte [0x100c068], 0
push 0x100c240
jne 0x1005703
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
jne 0x1005631
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
jmp 0x1005330
cmp eax, edi
jae 0x100532e
xor eax, eax
inc eax
cmp dword [ebp - 0x42c], eax
mov dword [ebp - 0x418], eax
jbe 0x1005809
mov ebx, dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
mov eax, dword [ebp - 0x424]
mov ecx, dword [ebp - 0x418]
lea esi, [eax + ecx*4]
mov eax, dword [esi]
cmp word [eax], 0x2f
je 0x10056e6
push 0x100c240
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov eax, dword [esi]
cmp word [eax], 0x2e
jne 0x1005729
xor edi, edi
cmp word [eax + 2], di
jne 0x1005729
lea ecx, [ebp - 0x420]
push ecx
lea ecx, [ebp - 0x20c]
push ecx
mov eax, 0x1001314
push 0x104
push eax
mov dword [esi], eax
call ebx
mov eax, dword [ebp - 0x420]
mov word [eax], di
mov dword [ebp - 0x420], edi
and word [ebp - 0x414], 0
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [ebp - 0x41c]
test al, al
jne 0x10056e6
cmp byte [0x100c069], al
je 0x1005809
inc dword [ebp - 0x418]
mov eax, dword [ebp - 0x418]
cmp eax, dword [ebp - 0x42c]
jb 0x1005654
jmp 0x1005809
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
jne 0x1005639
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x100c240
call fcn.010019e8
pop ecx
pop ecx
jmp 0x100581a
lea ecx, [ebp - 0x420]
push ecx
lea ecx, [ebp - 0x20c]
push ecx
push 0x104
push eax
call ebx
mov edi, eax
test edi, edi
je 0x10057f1
cmp edi, 0x103
ja 0x10057f1
push 0x3a
push dword [esi]
call dword [sym.imp.msvcrt.dll_wcschr]
test eax, eax
pop ecx
pop ecx
je 0x100576f
sub eax, dword [esi]
and eax, 0xfffffffe
cmp eax, 2
jne 0x10057de
push dword [esi]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [esi]
cmp word [ecx + eax*2 - 2], 0x2e
jne 0x100579b
cmp edi, 0x102
jae 0x10057de
push 0x1001318
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
cmp dword [ebp - 0x420], 0
je 0x10056ba
push dword [ebp - 0x420]
call dword [sym.imp.msvcrt.dll_wcslen]
cmp eax, 0x104
pop ecx
jae 0x10057de
push dword [ebp - 0x420]
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov eax, dword [ebp - 0x420]
and word [eax], 0
jmp 0x10056c2
mov eax, dword [ebp - 0x424]
mov ecx, dword [ebp - 0x418]
push dword [eax + ecx*4]
push 0x1b
jmp 0x1005802
mov eax, dword [ebp - 0x424]
mov ecx, dword [ebp - 0x418]
push dword [eax + ecx*4]
push 0x1e
call fcn.0100187f
pop ecx
pop ecx
push 0x100c240
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
call dword [ebp - 0x428]
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor eax, eax
pop esi
call fcn.010058ab
leave
ret