Function at 0x1005312
Capabilities:
Accept command line arguments
Check if file exists
Check os version
Create directory
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x1d9c
call fcn.01005e40
mov eax, dword [0x100700c]
push ebx
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
xor ebx, ebx
push 0x10021bc
mov dword [ebp - 0x1d94], ebx
mov dword [ebp - 0x1d98], ebx
mov dword [ebp - 0x1d9c], ebx
mov dword [0x1007228], eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
cmp eax, ebx
mov dword [0x100722c], eax
je 0x100536e
call fcn.010024b9
test eax, eax
jne 0x1005376
push 0x3f0
call fcn.0100292f
pop ecx
xor eax, eax
inc eax
jmp 0x1005aa9
push edi
push 0x25
pop ecx
xor eax, eax
lea edi, [ebp - 0x1d88]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x1d88]
push eax
mov dword [ebp - 0x1d88], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
xor edi, edi
inc edi
cmp dword [ebp - 0x1d84], 5
jne 0x10053b5
cmp dword [ebp - 0x1d80], ebx
jne 0x10053b5
mov dword [0x1007224], edi
push esi
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
lea ecx, [ebp - 0x1d90]
push ecx
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov esi, eax
cmp esi, ebx
jne 0x10053e2
push 0x3fd
call fcn.0100292f
pop ecx
mov eax, edi
jmp 0x1005aa7
cmp dword [ebp - 0x1d90], 2
jl 0x10055ca
cmp dword [ebp - 0x1d90], edi
mov dword [0x1007220], ebx
mov dword [ebp - 0x1d8c], ebx
mov word [ebp - 0x4dc], bx
mov word [ebp - 0xcc], bx
mov word [ebp - 0x6dc], bx
jle 0x100560d
mov ebx, 0x104
mov eax, dword [esi + edi*4]
mov cx, word [eax]
cmp cx, 0x2d
je 0x100545c
cmp cx, 0x2f
je 0x100545c
cmp word [ebp - 0x4dc], 0
jne 0x1005592
push eax
push ebx
lea eax, [ebp - 0x4dc]
push eax
call fcn.01002275
test eax, eax
jl 0x100566f
jmp 0x1005558
movzx eax, word [eax + 2]
push eax
call dword [sym.imp.msvcrt.dll_tolower]
cmp eax, 0x70
pop ecx
jg 0x1005525
je 0x1005519
cmp eax, 0x3f
je 0x10055d8
cmp eax, 0x63
je 0x100550d
cmp eax, 0x67
je 0x10054e6
cmp eax, 0x6e
jne 0x10055dc
mov eax, dword [esi + edi*4]
cmp word [eax + 4], 0x3a
jne 0x10054bc
movzx eax, word [eax + 6]
push eax
call dword [sym.imp.msvcrt.dll_tolower]
cmp eax, 0x77
pop ecx
jne 0x10054bc
mov dword [ebp - 0x1d9c], 1
inc edi
cmp edi, dword [ebp - 0x1d90]
jge 0x10055ac
push dword [esi + edi*4]
mov dword [ebp - 0x1d8c], 1
push 0x100
lea eax, [ebp - 0x6dc]
jmp 0x1005449
inc edi
cmp edi, dword [ebp - 0x1d90]
jge 0x10055b7
push dword [esi + edi*4]
mov dword [ebp - 0x1d8c], 1
push 0x64
lea eax, [ebp - 0xcc]
jmp 0x1005449
mov dword [ebp - 0x1d8c], 3
jmp 0x1005558
mov dword [0x1007230], 1
jmp 0x1005558
sub eax, 0x71
je 0x100554e
dec eax
je 0x1005542
sub eax, 3
jne 0x10055dc
mov dword [ebp - 0x1d8c], 1
jmp 0x1005558
mov dword [ebp - 0x1d8c], 4
jmp 0x1005558
mov dword [0x1007220], 1
inc edi
cmp edi, dword [ebp - 0x1d90]
jl 0x1005421
mov ecx, dword [ebp - 0x1d8c]
cmp ecx, 3
je 0x1005a77
cmp ecx, 4
je 0x1005a77
xor eax, eax
cmp ecx, eax
jne 0x10055ec
cmp word [ebp - 0x4dc], ax
jne 0x100561d
jmp 0x100560d
push 0x3ff
call fcn.0100292f
pop ecx
push dword [esi]
call fcn.01002af3
xor eax, eax
inc eax
jmp 0x1005aa7
push dword [esi + edi*4 - 4]
push 0x404
jmp 0x10055e4
push dword [esi + edi*4 - 4]
push 0x404
call fcn.0100292f
pop ecx
xor ebx, ebx
pop ecx
inc ebx
push dword [esi]
call fcn.01002af3
mov eax, ebx
jmp 0x1005aa7
xor ebx, ebx
jmp 0x10055ca
push dword [esi + edi*4]
push 0x3fe
call fcn.0100292f
pop ecx
jmp 0x100559c
cmp ecx, 1
jne 0x1005614
cmp word [ebp - 0x4dc], ax
jne 0x100561d
cmp word [ebp - 0xcc], ax
jne 0x1005679
cmp word [ebp - 0x6dc], 0
jne 0x1005679
push 0x400
jmp 0x1005597
cmp word [ebp - 0x4dc], ax
je 0x1005679
cmp word [ebp - 0x4da], 0x3a
je 0x1005657
cmp word [ebp - 0x4da], 0x5c
je 0x1005657
push ebx
lea eax, [ebp - 0x4dc]
push eax
lea eax, [ebp - 0x2d4]
push eax
call dword [sym.imp.msvcrt.dll__wfullpath]
add esp, 0xc
test eax, eax
jne 0x1005679
push 0x401
jmp 0x1005a0d
lea eax, [ebp - 0x4dc]
push eax
push ebx
lea eax, [ebp - 0x2d4]
push eax
call fcn.01002275
test eax, eax
jge 0x1005679
push 0x414
jmp 0x1005597
and word [0x1007018], 0
push ebx
mov esi, 0x1007018
push esi
call fcn.010023a9
push 0x1002198
push ebx
push esi
call fcn.010028f6
test eax, eax
jge 0x10056a7
push 0x408
jmp 0x1005a0d
mov edi, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push 0
push esi
call edi
cmp dword [ebp - 0x1d8c], 0
jne 0x10056f8
lea eax, [ebp - 0x1d98]
push eax
lea eax, [ebp - 0x2d4]
push eax
call fcn.01003bad
test eax, eax
je 0x10055a4
cmp dword [ebp - 0x1d98], 0
je 0x10058fc
push 0x1001ca4
push ebx
push esi
call fcn.010028f6
test eax, eax
jl 0x100569d
push 0
push esi
call edi
cmp dword [ebp - 0x1d8c], 1
jne 0x10058ef
xor edi, edi
cmp word [ebp - 0xcc], di
je 0x10057f1
lea eax, [ebp - 0xcc]
push eax
call dword [sym.imp.msvcrt.dll_wcslen]
cmp eax, 0x26
pop ecx
jne 0x10057e7
cmp word [ebp - 0xcc], 0x7b
jne 0x10057e7
cmp word [ebp - 0x82], 0x7d
jne 0x10057e7
push 0x2d
pop eax
cmp word [ebp - 0xba], ax
jne 0x10057e7
cmp word [ebp - 0xb0], ax
jne 0x10057e7
cmp word [ebp - 0xa6], ax
jne 0x10057e7
cmp word [ebp - 0x9c], ax
jne 0x10057e7
lea eax, [ebp - 0xcc]
push eax
push ebx
lea eax, [ebp - 0x4dc]
push eax
call fcn.01002275
test eax, eax
jl 0x100569d
push 0x1001c98
push ebx
lea eax, [ebp - 0x4dc]
push eax
call fcn.010028f6
test eax, eax
jl 0x100569d
push ebx
lea eax, [ebp - 0x2d4]
push eax
push ebx
lea eax, [ebp - 0x4dc]
push eax
lea eax, [ebp - 0xcc]
push eax
call fcn.01003ec0
test eax, eax
jne 0x10058cb
lea eax, [ebp - 0x4dc]
push eax
push 0x3ef
call fcn.0100292f
pop ecx
jmp 0x1005a12
push 0x406
jmp 0x1005a0d
cmp word [ebp - 0x6dc], di
lea eax, [ebp - 0x2d4]
je 0x1005832
push ebx
push eax
push ebx
lea eax, [ebp - 0x4dc]
push eax
push dword [ebp - 0x1d9c]
lea eax, [ebp - 0x6dc]
push eax
call fcn.01003f03
test eax, eax
jne 0x10058cb
lea eax, [ebp - 0x6dc]
push eax
push 0x405
jmp 0x10057dc
push eax
call fcn.01002501
test eax, eax
jne 0x10058cb
lea eax, [ebp - 0x1d98]
push eax
lea eax, [ebp - 0x2d4]
push eax
call fcn.01003bad
test eax, eax
je 0x10055a4
cmp dword [ebp - 0x1d98], edi
je 0x1005877
push 0x1001ca4
push ebx
push esi
call fcn.010028f6
test eax, eax
jl 0x100569d
push ebx
lea eax, [ebp - 0xaec]
push eax
lea eax, [ebp - 0x2d4]
push eax
call fcn.010040dd
test eax, eax
je 0x10055a4
lea eax, [ebp - 0xaec]
push eax
push ebx
lea eax, [ebp - 0x4dc]
push eax
call fcn.01002275
test eax, eax
jl 0x100569d
lea eax, [ebp - 0xaec]
push eax
push ebx
lea eax, [ebp - 0x2d4]
push eax
call fcn.01002275
test eax, eax
jl 0x100569d
lea eax, [ebp - 0x2d4]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x1005a18
lea eax, [ebp - 0x4dc]
push eax
push 0x3ef
jmp 0x100592a
cmp dword [ebp - 0x1d8c], 0
jne 0x1005a18
lea eax, [ebp - 0x2d4]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1005936
lea eax, [ebp - 0x2d4]
push eax
call fcn.01002501
test eax, eax
je 0x1005936
lea eax, [ebp - 0x2d4]
push eax
push 0x3ee
call fcn.010029d1
pop ecx
pop ecx
jmp 0x1005aa1
lea eax, [ebp - 0x2d4]
push eax
call fcn.01002ce0
test eax, eax
je 0x100595b
cmp dword [0x1007230], 0
jne 0x100595b
push 0x413
call fcn.010029d1
jmp 0x1005930
push ebx
lea eax, [ebp - 0xcf4]
push eax
lea eax, [ebp - 0x2d4]
push eax
call fcn.01002bb6
test eax, eax
je 0x1005a18
cmp dword [0x1007220], 0
jne 0x10059ee
mov esi, dword [sym.imp.USER32.dll_LoadStringW]
mov edi, 0x400
push edi
lea eax, [ebp - 0x1cf4]
push eax
push 0x10d88
push dword [0x100722c]
call esi
test eax, eax
je 0x10055a4
push edi
lea eax, [ebp - 0x14f4]
push eax
push 0x402
push dword [0x1007228]
call esi
test eax, eax
je 0x10055a4
push 0x24
lea eax, [ebp - 0x1cf4]
push eax
lea eax, [ebp - 0x14f4]
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
cmp eax, 7
jne 0x10059e9
xor eax, eax
jmp 0x1005aa7
cmp eax, 6
jne 0x1005a18
push ebx
lea eax, [ebp - 0x8e4]
push eax
push 1
lea eax, [ebp - 0xcf4]
push eax
call fcn.01004a17
test eax, eax
jne 0x1005a18
push 0x403
call fcn.0100292f
pop ecx
jmp 0x10055a4
and word [ebp - 0x8e4], 0
push ebx
lea eax, [ebp - 0x8e4]
push eax
push dword [ebp - 0x1d8c]
lea eax, [ebp - 0x2d4]
push eax
call fcn.01004a17
test eax, eax
jne 0x1005a70
cmp dword [ebp - 0x1d8c], eax
jne 0x1005a66
push ebx
lea eax, [ebp - 0x8e4]
push eax
push 2
lea eax, [ebp - 0x2d4]
push eax
mov dword [0x1007220], 1
call fcn.01004a17
mov dword [ebp - 0x1d94], 1
call fcn.01003cd1
jmp 0x1005aa1
call fcn.01003c61
xor eax, eax
cmp dword [ebp - 0x1d8c], 3
sete al
push eax
call fcn.01004519
test eax, eax
jne 0x1005a9c
mov dword [ebp - 0x1d94], 1
call fcn.01002412
mov eax, dword [ebp - 0x1d94]
pop esi
pop edi
mov ecx, dword [ebp - 4]
pop ebx
call fcn.01005b2e
leave
ret 0x10