Function at 0x402210
Capabilities:
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, dword [0x41a010]
sub esp, 0x264
test eax, eax
push ebx
push esi
push edi
je 0x402239
push 0
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x402614
mov eax, dword [ebp + 8]
movzx ecx, byte [eax + 0x21]
mov edx, dword [ebp + 0xc]
push ecx
push edx
call fcn.00402030
add esp, 8
test al, al
jne 0x402614
mov ebx, dword [ebp + 0x10]
lea edi, [ebx + 8]
lea eax, [edi + edi]
test eax, eax
je 0x402614
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
je 0x402614
mov eax, dword [ebp + 8]
cmp byte [eax + 0x20], 0
jne 0x4022bd
cmp ebx, 0xfa
jb 0x4022bd
mov edx, dword [0x41c278]
mov ebx, esi
call fcn.00404820
mov edi, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
add edi, 4
lea ebx, [esi + 8]
call fcn.00404820
mov ecx, dword [ebp + 0x10]
lea ebx, [esi + ecx*2 + 6]
mov edi, 5
jmp 0x4022d3
mov edx, dword [ebp + 0xc]
mov ebx, esi
call fcn.00404820
mov edx, dword [ebp + 0x10]
lea ebx, [esi + edx*2 - 2]
mov edi, 9
mov edx, str..
call fcn.00404820
lea eax, [esp + 0x20]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
push esi
mov edi, eax
xor esi, esi
push esi
mov dword [esp + 0x24], edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp edi, 0xffffffff
jne 0x40231f
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00407a20
add esp, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [esp + 0x18], esi
mov dword [esp + 0x10], esi
jmp 0x402330
mov ax, word [esp + 0x4c]
test ax, ax
je 0x4025ac
cmp ax, 0x2e
jne 0x402364
mov ax, word [esp + 0x4e]
test ax, ax
je 0x4025ac
cmp ax, 0x2e
jne 0x402364
cmp word [esp + 0x50], 0
je 0x4025ac
lea eax, [esp + 0x4c]
jmp 0x402370
mov dx, word [eax]
add eax, 2
test dx, dx
jne 0x402370
mov edi, dword [ebp + 0x10]
lea ecx, [esp + 0x4c]
sub eax, ecx
sar eax, 1
sub eax, 1
test esi, esi
mov dword [esp + 0x14], eax
jne 0x4023bc
lea eax, [edi + 0x109]
add eax, eax
je 0x4025c6
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
mov dword [esp + 0x10], eax
mov esi, eax
je 0x4025e4
test byte [esp + 0x20], 0x10
je 0x402488
mov edx, dword [0x41c248]
mov ebx, dword [edx]
test ebx, ebx
je 0x402430
mov edi, dword [ebx]
lea edx, [esp + 0x4c]
mov eax, edx
sub edi, eax
lea ecx, [ecx]
movzx eax, word [edi + edx]
cmp ax, 0x41
jb 0x4023f3
cmp ax, 0x5a
ja 0x4023f3
add eax, 0x20
movzx ecx, ax
movzx eax, word [edx]
cmp ax, 0x41
jb 0x402408
cmp ax, 0x5a
ja 0x402408
add eax, 0x20
add edx, 2
test cx, cx
movzx eax, ax
je 0x402418
cmp cx, ax
je 0x4023e0
movzx edx, ax
movzx eax, cx
sub eax, edx
je 0x4025ac
mov ebx, dword [ebx + 4]
test ebx, ebx
jne 0x4023d3
mov edi, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
add edi, 0x109
mov ebx, esi
call fcn.00404820
mov ecx, dword [ebp + 0x10]
lea ebx, [esi + ecx*2 - 2]
mov edx, 0x409268
mov edi, 0x10a
call fcn.00404820
mov edx, dword [ebp + 0x10]
lea ebx, [esi + edx*2]
lea edx, [esp + 0x4c]
mov edi, 0x109
call fcn.00404820
mov eax, dword [esp + 0x14]
mov ecx, dword [ebp + 0x10]
lea edx, [eax + ecx + 1]
mov eax, dword [ebp + 8]
push edx
push esi
push eax
call fcn.00402210
add esp, 0xc
jmp 0x402596
lea ebx, [esp + 0x20]
call fcn.00402150
test al, al
je 0x4025ac
mov ecx, dword [ebp + 8]
cmp byte [ecx + 0x20], 0
jne 0x40254b
mov edx, dword [esp + 0x14]
add edx, edi
cmp edx, 0xfa
jb 0x40254b
mov edx, dword [0x41c278]
mov byte [esp + 0xf], 0
add edi, 0x109
mov ebx, esi
call fcn.00404820
mov al, byte [esp + 0xf]
test al, al
jne 0x4024ea
mov edx, dword [ebp + 0xc]
add edi, 0xfffffffc
lea ebx, [esi + 8]
call fcn.00404820
mov al, byte [esp + 0xf]
mov cl, al
mov edx, dword [esp + 0x10]
neg cl
sbb ecx, ecx
and ecx, 4
neg al
mov esi, ecx
lea edi, [esi + 0x106]
sbb eax, eax
and eax, 0xfffffffc
add eax, 4
add eax, dword [ebp + 0x10]
lea eax, [edx + eax*2]
mov dword [esp + 0x14], eax
lea ebx, [eax - 2]
mov eax, 0x409268
call fcn.00404850
mov ebx, dword [esp + 0x14]
lea edi, [esi + 0x105]
lea eax, [esp + 0x4c]
call fcn.00404850
mov ecx, dword [esp + 0x3c]
test ecx, ecx
mov esi, dword [esp + 0x40]
mov eax, dword [ebp + 8]
ja 0x402558
cmp esi, dword [eax + 0x14]
ja 0x402558
mov dl, 1
jmp 0x40255a
mov edx, dword [ebp + 0xc]
mov byte [esp + 0xf], 1
jmp 0x4024c3
xor dl, dl
mov byte [eax + 0x22], dl
mov edx, dword [esp + 0x20]
mov ebx, 1
test bl, dl
je 0x402572
mov byte [eax + 0x23], bl
mov dword [eax + 0x24], edx
jmp 0x402576
mov byte [eax + 0x23], 0
push eax
mov dword [eax + 0x1c], ecx
mov dword [eax + 0x18], esi
mov eax, dword [esp + 0x14]
push eax
call fcn.00403c00
mov esi, dword [esp + 0x18]
add esp, 8
cmp al, bl
jne 0x402596
add dword [esp + 0x18], ebx
mov eax, dword [0x41a010]
test eax, eax
je 0x4025ac
push 0
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x4025d4
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x20]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x402330
jmp 0x4025e4
mov dword [esp + 0x10], 0
mov esi, dword [esp + 0x10]
jmp 0x4025e4
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [esp + 0x18], 0
jle 0x4025f9
mov eax, dword [ebp + 0xc]
push 0
push eax
call fcn.00408bb0
add esp, 8
mov ecx, dword [esp + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_FindClose]
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret