Function at 0x402800
Capabilities:
Check if file exists
Create directory
Enumerate files on windows
Enumerate files recursively
Get file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x87c
mov eax, dword [0x423020]
xor eax, esp
mov dword [esp + 0x878], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 0x10]
push edi
mov dword [esp + 0x18], eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x402868
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x402868
push edi
push str.CreateDirectory__s_failed
call fcn.00403ce0
add esp, 8
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x878]
xor ecx, esp
call fcn.0040a3ae
mov esp, ebp
pop ebp
ret
lea edx, [esp + 0x268]
mov eax, ebx
sub edx, ebx
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x402873
lea eax, [esp + 0x268]
add eax, 0xfffffffe
lea esp, [esp]
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x402890
mov ecx, dword [0x4202c0]
mov edx, dword [0x4202c4]
mov dword [eax], ecx
mov cx, word [0x4202c8]
mov dword [eax + 4], edx
lea edx, [esp + 0x18]
mov word [eax + 8], cx
push edx
lea eax, [esp + 0x26c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [esp + 0x10], eax
cmp eax, 0xffffffff
jne 0x402902
push edi
push ebx
lea ecx, [esp + 0x270]
push ecx
push str.cannot_FindFirstFileW__s_copy_______s_n
call fcn.00403ce0
add esp, 0x10
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x878]
xor ecx, esp
call fcn.0040a3ae
mov esp, ebp
pop ebp
ret
mov esi, dword [sym.imp.USER32.dll_wsprintfW]
lea edx, [esp + 0x44]
push edx
push ebx
lea eax, [esp + 0x680]
push 0x4202cc
push eax
call esi
lea ecx, [esp + 0x54]
push ecx
push edi
lea edx, [esp + 0x488]
push 0x4202cc
push edx
call esi
add esp, 0x20
test byte [esp + 0x18], 0x10
je 0x4029e6
lea eax, [esp + 0x44]
push eax
push str.___s_n
call fcn.0040b489
add esp, 8
mov ecx, 0x4202d8
lea eax, [esp + 0x44]
jmp 0x402960
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x402986
test dx, dx
je 0x402982
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x402986
add eax, 4
add ecx, 4
test dx, dx
jne 0x402960
xor eax, eax
jmp 0x40298b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x402a09
mov ecx, 0x4202dc
lea eax, [esp + 0x44]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4029be
test dx, dx
je 0x4029ba
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4029be
add eax, 4
add ecx, 4
test dx, dx
jne 0x402998
xor eax, eax
jmp 0x4029c3
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x402a09
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x470]
push ecx
lea edx, [esp + 0x67c]
push edx
push eax
call fcn.00402800
add esp, 0xc
jmp 0x402a01
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x678]
push ecx
lea ecx, [esp + 0x474]
call fcn.00402500
add esp, 4
test al, al
je 0x402851
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x18]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x402908
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
je 0x402a41
call fcn.00403bf0
push eax
push edi
push ebx
push str.copy_error_______s__s_n
call fcn.00403ce0
add esp, 0x10
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [esp + 0x884]
pop edi
pop esi
pop ebx
xor ecx, esp
mov al, 1
call fcn.0040a3ae
mov esp, ebp
pop ebp
ret