Function at 0x409440
Capabilities:
Check if file exists
Enumerate files on windows
Enumerate files recursively
Get file attributes
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x280
mov eax, dword [0x4b0008]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
mov ebx, dword [ebp + 8]
xorps xmm0, xmm0
push esi
push edi
push ebx
mov dword [ebp - 0x278], ecx
movlpd qword [ebp - 0x264], xmm0
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4094fe
test al, 0x10
je 0x4096d7
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x409487
sub ecx, edx
mov edx, 2
sar ecx, 1
lea esi, [ecx + 3]
xor ecx, ecx
mov eax, esi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0041b3e1
mov edi, eax
add esp, 4
mov dword [ebp - 0x270], edi
test edi, edi
je 0x4094fe
push ebx
push esi
push edi
call fcn.004213f7
add esp, 0xc
push 0x4ab4ac
push esi
push edi
call fcn.0042145b
add esp, 0xc
lea eax, [ebp - 0x25c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, eax
mov dword [ebp - 0x26c], esi
cmp esi, 0xffffffff
jne 0x409515
push edi
call fcn.0041b39b
add esp, 4
xor eax, eax
xor edx, edx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0041b38a
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x260]
mov eax, dword [ebp - 0x264]
mov dword [ebp - 0x268], edi
mov dword [ebp - 0x260], eax
nop dword [eax]
mov ecx, 0x4ab4b4
lea eax, [ebp - 0x230]
nop dword [eax + eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x409566
test dx, dx
je 0x409562
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x409566
add eax, 4
add ecx, 4
test dx, dx
jne 0x409540
xor eax, eax
jmp 0x40956b
sbb eax, eax
or eax, 1
test eax, eax
je 0x409673
mov eax, 0x4ab4b8
lea ecx, [ebp - 0x230]
nop
mov dx, word [ecx]
cmp dx, word [eax]
jne 0x4095a6
test dx, dx
je 0x4095a2
mov dx, word [ecx + 2]
cmp dx, word [eax + 2]
jne 0x4095a6
add ecx, 4
add eax, 4
test dx, dx
jne 0x409580
xor eax, eax
jmp 0x4095ab
sbb eax, eax
or eax, 1
test eax, eax
je 0x409673
mov ecx, ebx
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4095c0
sub ecx, edx
lea edx, [ebp - 0x230]
sar ecx, 1
lea esi, [edx + 2]
nop dword [eax + eax]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x4095e0
sub edx, esi
lea edi, [ecx + 2]
sar edx, 1
xor ecx, ecx
add edi, edx
mov edx, 2
mov eax, edi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0041b3e1
mov esi, eax
add esp, 4
test esi, esi
je 0x4096a6
push ebx
push edi
push esi
call fcn.004213f7
add esp, 0xc
push 0x4ab894
push edi
push esi
call fcn.0042145b
add esp, 0xc
lea eax, [ebp - 0x230]
push eax
push edi
push esi
call fcn.0042145b
mov ecx, dword [ebp - 0x278]
add esp, 0xc
push esi
call fcn.00409440
add dword [ebp - 0x260], eax
mov edi, dword [ebp - 0x268]
adc edi, edx
push esi
mov dword [ebp - 0x268], edi
call fcn.0041b39b
mov esi, dword [ebp - 0x26c]
add esp, 4
lea eax, [ebp - 0x25c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x409530
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
push dword [ebp - 0x270]
call fcn.0041b39b
mov eax, dword [ebp - 0x260]
add esp, 4
jmp 0x409713
push dword [ebp - 0x26c]
call dword [sym.imp.KERNEL32.dll_FindClose]
push dword [ebp - 0x270]
call fcn.0041b39b
add esp, 4
xor eax, eax
xor edx, edx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0041b38a
mov esp, ebp
pop ebp
ret 4
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
lea eax, [ebp - 0x27c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x27c]
mov edi, dword [ebp - 0x278]
mov ecx, dword [ebp - 8]
mov edx, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041b38a
mov esp, ebp
pop ebp
ret 4