Function at 0x1002c0e
Capabilities:
Check if file exists
Enumerate files on windows
Get common file path
Get system information on windows
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xe64
mov eax, dword [0x1007004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
xor esi, esi
push 0x400
lea eax, [ebp - 0x404]
push esi
push eax
mov dword [ebp - 0xe60], esi
mov dword [ebp - 0xe58], esi
mov dword [ebp - 0xe64], esi
call sub.msvcrt.dll_memset
add esp, 0xc
call fcn.01002b88
push 0x100eac0
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
xor ebx, ebx
inc ebx
cmp dword [ebp + 8], ebx
jle 0x1002d84
mov dword [ebp - 0xe5c], 2
push 0x1001468
push dword [edi + ebx*4]
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x1002d3a
mov eax, dword [ebp - 0xe5c]
cmp eax, dword [ebp + 8]
jge 0x1002de8
inc ebx
push dword [edi + ebx*4]
inc dword [ebp - 0xe5c]
lea eax, [ebp - 0x404]
push 0x200
push eax
call fcn.01005617
add esp, 0xc
cmp word [ebp - 0x404], 0x22
lea esi, [ebp - 0x404]
jne 0x1002cd5
inc esi
inc esi
cmp word [esi], 0x22
je 0x1002ccd
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x1002cda
sub eax, edx
jmp 0x1002d13
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x1002ced
sub eax, edx
sar eax, 1
xor ecx, ecx
mov word [esi + eax*2 - 2], cx
mov eax, esi
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x1002d07
sub eax, ecx
sar eax, 1
cmp word [esi + eax*2 - 2], 0x22
je 0x1002ce8
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x1002dc9
push 0x100145c
push esi
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
jmp 0x1002d74
push 0x1001454
push dword [edi + ebx*4]
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
je 0x1002e05
push 0x100143c
push dword [edi + ebx*4]
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x1002e16
mov dword [ebp - 0xe64], 1
inc ebx
inc dword [ebp - 0xe5c]
cmp ebx, dword [ebp + 8]
jl 0x1002c78
push 0x10012b8
call fcn.01002af7
pop ecx
mov edi, 0x200
test esi, esi
jne 0x1002e57
lea eax, [ebp - 0x404]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
jne 0x1002e3f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov dword [ebp - 0xe58], eax
push 0x10013e0
jmp 0x1003070
push 3
pop eax
push eax
mov dword [ebp - 0xe58], eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
push 0x10013a4
call fcn.01002af7
jmp 0x1003076
push 0x57
pop eax
push eax
mov dword [ebp - 0xe58], eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
push dword [edi + ebx*4]
push 0x1001374
jmp 0x1003070
call fcn.01002ba5
and dword [ebp - 0xe58], 0
jmp 0x1003077
push 0x57
pop eax
push eax
mov dword [ebp - 0xe58], eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
push dword [edi + ebx*4]
push 0x1001374
call fcn.01002af7
pop ecx
pop ecx
call fcn.01002ba5
jmp 0x1003077
push 0x100145c
lea eax, [ebp - 0x404]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea esi, [ebp - 0x404]
lea eax, [ebp - 0xe54]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov ebx, eax
test ebx, ebx
je 0x100305a
cmp ebx, 0xffffffff
je 0x100305a
lea eax, [ebp - 0xe60]
push eax
call fcn.01003267
test byte [ebp - 0xe54], 0x10
jne 0x1002ee4
push 0x400
lea eax, [ebp - 0xc04]
push 0
push eax
call sub.msvcrt.dll_memset
push esi
lea eax, [ebp - 0xc04]
push edi
push eax
call fcn.01005617
add esp, 0x18
lea eax, [ebp - 0xc04]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [ebp - 0xe28]
push eax
lea eax, [ebp - 0xc04]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0xc04]
push eax
push dword [ebp - 0xe60]
call fcn.010035f8
lea eax, [ebp - 0xe54]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x1002e84
cmp dword [ebp - 0xe64], eax
je 0x1002feb
push 0x100136c
mov esi, 0x1001354
push esi
call dword [sym.imp.msvcrt.dll__wfopen]
mov ebx, eax
pop ecx
pop ecx
mov dword [ebp - 0xe64], ebx
test ebx, ebx
jne 0x1002f3c
push 5
pop eax
push eax
mov dword [ebp - 0xe58], eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
push esi
push 0x1001320
jmp 0x1003070
mov eax, dword [ebp - 0xe60]
mov esi, dword [eax + 4]
test esi, esi
je 0x1002fd8
mov edi, dword [sym.imp.msvcrt.dll_fwrite]
push dword [esi + 0x1464]
lea eax, [ebp - 0x804]
push dword [esi + 0x1460]
push 0x1001310
push 0x200
push eax
call dword [sym.imp.msvcrt.dll__snwprintf]
add esp, 0x14
push ebx
push eax
push 1
lea eax, [ebp - 0x804]
push eax
call fcn.010032ef
push eax
call edi
lea ecx, [esi + 0x400]
mov eax, ecx
add esp, 0x10
lea edx, [eax + 2]
mov bx, word [eax]
inc eax
inc eax
test bx, bx
jne 0x1002f9a
mov ebx, dword [ebp - 0xe64]
sub eax, edx
push ebx
sar eax, 1
push eax
push 1
push ecx
call fcn.010032ef
push eax
call edi
push ebx
push 1
push 1
push 0x100130c
call edi
mov esi, dword [esi + 0x1470]
add esp, 0x20
test esi, esi
jne 0x1002f53
push ebx
call dword [sym.imp.msvcrt.dll_fflush]
push ebx
call dword [sym.imp.msvcrt.dll_fclose]
jmp 0x1003075
mov eax, dword [ebp - 0xe60]
mov esi, dword [eax + 4]
jmp 0x1003054
lea eax, [esi + 0x800]
push eax
lea eax, [esi + 0x1010]
push eax
push 0x10012e4
lea eax, [ebp - 0x804]
push edi
push eax
call dword [sym.imp.msvcrt.dll__snwprintf]
add esp, 0x14
test eax, eax
jl 0x1003022
cmp eax, edi
jb 0x1003027
mov eax, 0x1ff
xor ecx, ecx
push esi
mov word [ebp + eax*2 - 0x804], cx
call fcn.01004e7f
test eax, eax
je 0x100304e
lea eax, [ebp - 0x804]
push eax
lea eax, [esi + 0xa08]
push eax
call fcn.0100473e
mov esi, dword [esi + 0x1470]
test esi, esi
jne 0x1002ff6
jmp 0x1003077
push 2
pop eax
push eax
mov dword [ebp - 0xe58], eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
push esi
push 0x10012bc
call fcn.01002af7
pop ecx
pop ecx
push 0x10012b8
call fcn.01002af7
pop ecx
push dword [ebp - 0xe60]
call fcn.010032c7
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0xe58]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.010054ac
leave
ret 8