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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa18
mov eax, dword [0x4ad2d0]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
mov dword [ebp - 0x55c], 0
mov byte [ebp - 0x418], 0
push 0x40f
push 0
lea eax, [ebp - 0x417]
push eax
call fcn.00499430
add esp, 0xc
mov cx, word [0x4ab1ac]
mov word [ebp - 0x560], cx
mov dl, byte [0x4ab1ae]
mov byte [ebp - 0x55e], dl
movzx eax, byte [ebp + 0xc]
test eax, eax
jne 0x401969
mov ecx, dword [ebp + 8]
push ecx
lea edx, [ebp - 0x418]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x418]
mov dword [ebp - 0x980], eax
mov ecx, dword [ebp - 0x980]
add ecx, 1
mov dword [ebp - 0x984], ecx
mov edx, dword [ebp - 0x980]
mov al, byte [edx]
mov byte [ebp - 0x985], al
add dword [ebp - 0x980], 1
cmp byte [ebp - 0x985], 0
jne 0x4018fe
mov ecx, dword [ebp - 0x980]
sub ecx, dword [ebp - 0x984]
mov dword [ebp - 0x98c], ecx
mov dl, byte [ebp - 0x98c]
mov byte [ebp - 0x561], dl
mov eax, dword [0x4bcc7c]
push eax
push 1
push 1
lea ecx, [ebp - 0x561]
push ecx
call fcn.004921a5
add esp, 0x10
mov edx, dword [0x4bcc7c]
push edx
lea eax, [ebp - 0x418]
push eax
call fcn.00491f34
add esp, 8
mov cl, byte [ebp + 0xc]
add cl, 1
mov byte [ebp + 0xc], cl
mov edx, dword [ebp + 8]
mov dword [ebp - 0x990], edx
mov eax, dword [ebp - 0x990]
add eax, 1
mov dword [ebp - 0x994], eax
mov ecx, dword [ebp - 0x990]
mov dl, byte [ecx]
mov byte [ebp - 0x995], dl
add dword [ebp - 0x990], 1
cmp byte [ebp - 0x995], 0
jne 0x40198a
mov eax, dword [ebp - 0x990]
sub eax, dword [ebp - 0x994]
mov dword [ebp - 0x99c], eax
cmp dword [ebp - 0x99c], 0x30c
jbe 0x4019cb
jmp 0x401ef0
push 0x103
push 0
lea ecx, [ebp - 0x418]
push ecx
call fcn.004029d0
add esp, 0xc
mov edx, dword [ebp + 8]
push edx
push 0x4ab1b0
lea eax, [ebp - 0x418]
push eax
call fcn.00491923
add esp, 0xc
lea ecx, [ebp - 0x558]
push ecx
lea edx, [ebp - 0x418]
push edx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [ebp - 0x55c], eax
cmp dword [ebp - 0x55c], 0xffffffff
jne 0x401a21
jmp 0x401ef0
lea eax, [ebp - 0x52c]
mov dword [ebp - 0x9a0], eax
mov ecx, dword [ebp - 0x9a0]
add ecx, 1
mov dword [ebp - 0x9a4], ecx
mov edx, dword [ebp - 0x9a0]
mov al, byte [edx]
mov byte [ebp - 0x9a5], al
add dword [ebp - 0x9a0], 1
cmp byte [ebp - 0x9a5], 0
jne 0x401a3c
mov ecx, dword [ebp - 0x9a0]
sub ecx, dword [ebp - 0x9a4]
mov dword [ebp - 0x9ac], ecx
cmp dword [ebp - 0x9ac], 0xff
jbe 0x401a7d
jmp 0x401ec7
mov edx, dword [ebp - 0x558]
and edx, 0x10
je 0x401dbd
lea eax, [ebp - 0x55f]
mov dword [ebp - 0x9b0], eax
lea ecx, [ebp - 0x52c]
mov dword [ebp - 0x9b4], ecx
mov edx, dword [ebp - 0x9b4]
mov al, byte [edx]
mov byte [ebp - 0x9b5], al
mov ecx, dword [ebp - 0x9b0]
cmp al, byte [ecx]
jne 0x401b02
cmp byte [ebp - 0x9b5], 0
je 0x401af6
mov edx, dword [ebp - 0x9b4]
mov al, byte [edx + 1]
mov byte [ebp - 0x9b6], al
mov ecx, dword [ebp - 0x9b0]
cmp al, byte [ecx + 1]
jne 0x401b02
add dword [ebp - 0x9b4], 2
add dword [ebp - 0x9b0], 2
cmp byte [ebp - 0x9b6], 0
jne 0x401aa4
mov dword [ebp - 0x9bc], 0
jmp 0x401b0d
sbb edx, edx
sbb edx, 0xffffffff
mov dword [ebp - 0x9bc], edx
mov eax, dword [ebp - 0x9bc]
mov dword [ebp - 0x9c0], eax
cmp dword [ebp - 0x9c0], 0
je 0x401bbc
lea ecx, [ebp - 0x560]
mov dword [ebp - 0x9c4], ecx
lea edx, [ebp - 0x52c]
mov dword [ebp - 0x9c8], edx
mov eax, dword [ebp - 0x9c8]
mov cl, byte [eax]
mov byte [ebp - 0x9c9], cl
mov edx, dword [ebp - 0x9c4]
cmp cl, byte [edx]
jne 0x401b9c
cmp byte [ebp - 0x9c9], 0
je 0x401b90
mov eax, dword [ebp - 0x9c8]
mov cl, byte [eax + 1]
mov byte [ebp - 0x9ca], cl
mov edx, dword [ebp - 0x9c4]
cmp cl, byte [edx + 1]
jne 0x401b9c
add dword [ebp - 0x9c8], 2
add dword [ebp - 0x9c4], 2
cmp byte [ebp - 0x9ca], 0
jne 0x401b3e
mov dword [ebp - 0x9d0], 0
jmp 0x401ba7
sbb eax, eax
sbb eax, 0xffffffff
mov dword [ebp - 0x9d0], eax
mov ecx, dword [ebp - 0x9d0]
mov dword [ebp - 0x9d4], ecx
cmp dword [ebp - 0x9d4], 0
jne 0x401bc1
jmp 0x401ec7
mov edx, dword [0x4bcc7c]
push edx
push 1
push 1
lea eax, [ebp + 0xc]
push eax
call fcn.004921a5
add esp, 0x10
mov byte [ebp - 0x562], 1
mov ecx, dword [0x4bcc7c]
push ecx
push 1
push 1
lea edx, [ebp - 0x562]
push edx
call fcn.004921a5
add esp, 0x10
lea eax, [ebp - 0x52c]
mov dword [ebp - 0x9d8], eax
mov ecx, dword [ebp - 0x9d8]
add ecx, 1
mov dword [ebp - 0x9dc], ecx
mov edx, dword [ebp - 0x9d8]
mov al, byte [edx]
mov byte [ebp - 0x9dd], al
add dword [ebp - 0x9d8], 1
cmp byte [ebp - 0x9dd], 0
jne 0x401c14
mov ecx, dword [ebp - 0x9d8]
sub ecx, dword [ebp - 0x9dc]
mov dword [ebp - 0x9e4], ecx
mov dl, byte [ebp - 0x9e4]
mov byte [ebp - 0x562], dl
mov eax, dword [0x4bcc7c]
push eax
push 1
push 1
lea ecx, [ebp - 0x562]
push ecx
call fcn.004921a5
add esp, 0x10
mov edx, dword [0x4bcc7c]
push edx
lea eax, [ebp - 0x52c]
push eax
call fcn.00491f34
add esp, 8
mov byte [ebp - 0x978], 0
push 0x40f
push 0
lea ecx, [ebp - 0x977]
push ecx
call fcn.00499430
add esp, 0xc
lea edx, [ebp - 0x418]
push edx
lea eax, [ebp - 0x978]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0x5c
lea ecx, [ebp - 0x978]
push ecx
call fcn.00401850
add esp, 8
mov byte [eax + 1], 0
lea edx, [ebp - 0x52c]
mov dword [ebp - 0x9e8], edx
mov eax, dword [ebp - 0x9e8]
mov dword [ebp - 0x9ec], eax
mov ecx, dword [ebp - 0x9e8]
mov dl, byte [ecx]
mov byte [ebp - 0x9ed], dl
add dword [ebp - 0x9e8], 1
cmp byte [ebp - 0x9ed], 0
jne 0x401cdd
mov eax, dword [ebp - 0x9e8]
sub eax, dword [ebp - 0x9ec]
mov ecx, dword [ebp - 0x9ec]
mov dword [ebp - 0x9f4], ecx
mov dword [ebp - 0x9f8], eax
lea edx, [ebp - 0x978]
add edx, 0xffffffff
mov dword [ebp - 0x9fc], edx
mov eax, dword [ebp - 0x9fc]
mov cl, byte [eax + 1]
mov byte [ebp - 0x9fd], cl
add dword [ebp - 0x9fc], 1
cmp byte [ebp - 0x9fd], 0
jne 0x401d28
mov edi, dword [ebp - 0x9fc]
mov esi, dword [ebp - 0x9f4]
mov edx, dword [ebp - 0x9f8]
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [ebp - 0x978]
add eax, 0xffffffff
mov dword [ebp - 0xa04], eax
mov ecx, dword [ebp - 0xa04]
mov dl, byte [ecx + 1]
mov byte [ebp - 0xa05], dl
add dword [ebp - 0xa04], 1
cmp byte [ebp - 0xa05], 0
jne 0x401d76
mov edi, dword [ebp - 0xa04]
mov ax, word [0x4ab1b8]
mov word [edi], ax
movzx ecx, byte [ebp + 0xc]
push ecx
lea edx, [ebp - 0x978]
push edx
call fcn.00401870
add esp, 8
jmp 0x401ec7
mov eax, dword [0x4bcc7c]
push eax
push 1
push 1
lea ecx, [ebp + 0xc]
push ecx
call fcn.004921a5
add esp, 0x10
mov byte [ebp - 0x979], 0
mov edx, dword [0x4bcc7c]
push edx
push 1
push 1
lea eax, [ebp - 0x979]
push eax
call fcn.004921a5
add esp, 0x10
lea ecx, [ebp - 0x52c]
mov dword [ebp - 0xa0c], ecx
mov edx, dword [ebp - 0xa0c]
add edx, 1
mov dword [ebp - 0xa10], edx
mov eax, dword [ebp - 0xa0c]
mov cl, byte [eax]
mov byte [ebp - 0xa11], cl
add dword [ebp - 0xa0c], 1
cmp byte [ebp - 0xa11], 0
jne 0x401e0f
mov edx, dword [ebp - 0xa0c]
sub edx, dword [ebp - 0xa10]
mov dword [ebp - 0xa18], edx
mov al, byte [ebp - 0xa18]
mov byte [ebp - 0x979], al
mov ecx, dword [0x4bcc7c]
push ecx
push 1
push 1
lea edx, [ebp - 0x979]
push edx
call fcn.004921a5
add esp, 0x10
mov eax, dword [0x4bcc7c]
push eax
lea ecx, [ebp - 0x52c]
push ecx
call fcn.00491f34
add esp, 8
mov edx, dword [0x4bcc7c]
push edx
push 1
push 4
lea eax, [ebp - 0x53c]
push eax
call fcn.004921a5
add esp, 0x10
mov ecx, dword [0x4bcc7c]
push ecx
push 1
push 4
lea edx, [ebp - 0x538]
push edx
call fcn.004921a5
add esp, 0x10
mov eax, dword [0x4bcc7c]
push eax
push 1
push 8
lea ecx, [ebp - 0x544]
push ecx
call fcn.004921a5
add esp, 0x10
lea edx, [ebp - 0x558]
push edx
mov eax, dword [ebp - 0x55c]
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x401a21
mov ecx, dword [ebp - 0x55c]
push ecx
call dword [sym.imp.KERNEL32.dll_FindClose]
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00491914
mov esp, ebp
pop ebp
ret