Function at 0x10002140
Capabilities:
Enumerate files on windows
Enumerate files recursively
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa84
lea eax, [ebp - 0xa84]
push ebx
push esi
push edi
push 0x830
xor esi, esi
push esi
push eax
call fcn.1000f620
mov edx, dword [ebp + 8]
add esp, 0xc
movzx ecx, word [edx]
test cx, cx
je 0x10002185
xor eax, eax
inc esi
mov word [ebp + eax - 0xa84], cx
lea eax, [esi + esi]
movzx ecx, word [eax + edx]
test cx, cx
jne 0x10002170
lea edi, [ebp - 0xa84]
cmp word [edi + esi*2 - 2], 0x5c
lea edi, [edi + esi*2]
je 0x100021ad
mov eax, 0x5c
inc esi
mov word [edi], ax
lea edi, [ebp - 0xa84]
lea edi, [edi + esi*2]
xor eax, eax
mov word [edi], ax
call fcn.10007610
cmp dword [ebp + 0xc], 0
mov ebx, eax
je 0x100021d8
lea ecx, [ebx + 0x190]
push ecx
lea eax, [ebp - 0xa84]
push eax
call fcn.10007500
add esp, 8
test eax, eax
jne 0x10002417
mov eax, 0x2a
mov word [edi], ax
lea eax, [ebp - 0x254]
push eax
lea eax, [ebp - 0xa84]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
xor ecx, ecx
mov dword [ebp - 4], eax
mov dword [ebp + 8], ecx
cmp eax, 0xffffffff
jne 0x10002223
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0xa84]
push eax
push str.____FindFirstFileW__ws__call_error__code:__d_n
call fcn.10006000
add esp, 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp + 0x10]
nop word [eax + eax]
test byte [ebp - 0x254], 0x10
je 0x100022ca
cmp word [ebp - 0x228], 0x2e
jne 0x1000226b
mov ax, word [ebp - 0x226]
test ax, ax
je 0x10002354
cmp ax, 0x2e
jne 0x1000226b
cmp word [ebp - 0x224], 0
je 0x10002354
lea eax, [ebp - 0x228]
push eax
push str.Find_dir:__ws_n
call fcn.10006000
lea eax, [ebp - 0x228]
push eax
call fcn.100020e0
add esp, 0xc
test eax, eax
je 0x10002354
lea ecx, [ebp - 0x228]
mov edx, edi
mov eax, ecx
sub edx, eax
nop
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x100022a0
mov eax, dword [ebp + 0xc]
inc eax
push esi
push eax
lea eax, [ebp - 0xa84]
push eax
call fcn.10002140
add esp, 0xc
jmp 0x10002354
lea eax, [ebp - 0x228]
push eax
call fcn.10001ee0
add esp, 4
test eax, eax
je 0x10002354
lea ecx, [ebp - 0x228]
mov edx, edi
mov eax, ecx
sub edx, eax
nop dword [eax]
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x100022f0
lea eax, [ebp - 0xa84]
push eax
push str.Find_file:__ws_n
call fcn.10006000
add esp, 8
cmp dword [ebp - 0x238], 0
jne 0x10002326
cmp dword [ebp - 0x234], 0
je 0x10002354
cmp byte [ebx + 0x190], 0
lea eax, [ebp - 0xa84]
je 0x10002341
push eax
push ebx
call fcn.10001df0
add esp, 8
jmp 0x1000234d
push 1
push esi
push eax
call fcn.10002420
add esp, 0xc
mov dword [ebp + 8], 1
lea eax, [ebp - 0x254]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x10002230
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x10002417
lea ecx, [ebx + 0x3d4]
sub edi, ecx
nop
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edi + ecx - 2], ax
test ax, ax
jne 0x10002380
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
lea eax, [ebp - 0xa84]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x100023fc
push 0
lea eax, [ebp + 0xc]
mov dword [ebp + 0xc], 0
push eax
push dword [ebx + 0x5e0]
push dword [ebx + 0x5dc]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x100023ee
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.____WriteFile_Note__failed__erorr_code__d_n
call fcn.10006000
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0xa84]
push eax
push str.____Error_create_Note_file__s__error_code__d_n
call fcn.10006000
add esp, 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret