Function at 0x408520
Capabilities:
Enumerate files on windows

Disassembly:
sub esp, 0x360
push ebx
push ebp
push esi
mov esi, ecx
xor ebx, ebx
push edi
mov eax, dword [esi + 0x1dda4]
cmp eax, ebx
jl 0x40856c
mov ecx, eax
shl ecx, 6
add ecx, eax
lea ecx, [ecx + ecx*2]
lea ecx, [ecx + ecx*4]
shl ecx, 2
sub ecx, eax
lea ecx, [esi + ecx*8 + 0x5380c0]
cmp dword [ecx], ebx
jne 0x408568
dec eax
sub ecx, 0x79d8
cmp eax, ebx
jge 0x408551
xor eax, eax
mov dword [esp + 0x10], eax
jmp 0x408591
cmp eax, ebx
jge 0x408574
xor eax, eax
mov dword [esp + 0x10], eax
jmp 0x408591
mov ecx, eax
shl ecx, 6
add ecx, eax
lea ecx, [ecx + ecx*2]
lea edx, [ecx + ecx*4]
shl edx, 2
sub edx, eax
lea eax, [esi + edx*8 + 0x5306ec]
mov dword [esp + 0x10], eax
cmp dword [esi + 0x5c9018], ebx
jne 0x408a2b
cmp eax, ebx
mov dword [esi + 0x2586c], ebx
jne 0x408726
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x28]
lea edx, [esp + 0x28]
rep stosd dword es:[edi], eax
mov ecx, 0x41
lea edi, [esp + 0x26c]
rep stosd dword es:[edi], eax
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
lea ecx, [esi + 0x5ca5c8]
push ecx
push edx
call edi
lea eax, [esi + 0x5ca6cc]
lea ecx, [esp + 0x28]
push eax
push ecx
call edi
lea edx, [esp + 0x28]
push 0x41a23c
push edx
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [esp + 0x28]
lea ecx, [esp + 0x26c]
push eax
push ecx
call ebx
lea edx, [esp + 0x28]
push 0x41a798
push edx
call edi
xor ebp, ebp
mov ecx, dword [esi + 0x25868]
lea eax, [esp + 0x12c]
inc ecx
push eax
test ebp, ebp
mov dword [esi + 0x25868], ecx
jne 0x4086c1
lea ecx, [esp + 0x2c]
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x408ee5
mov edx, dword [esp + 0x12c]
and edx, 0x10
test dl, dl
je 0x408660
dec dword [esi + 0x25868]
jmp 0x408617
lea eax, [esp + 0x26c]
push eax
mov eax, dword [esi + 0x25868]
mov ecx, eax
shl ecx, 6
add ecx, eax
lea edx, [esi + ecx*4 + 0x258b8]
push edx
call ebx
lea eax, [esp + 0x158]
push eax
mov eax, dword [esi + 0x25868]
mov ecx, eax
shl ecx, 6
add ecx, eax
lea edx, [esi + ecx*4 + 0x258b8]
push edx
call edi
mov eax, 0x10624dd3
mul dword [esp + 0x14c]
mov eax, dword [esi + 0x2586c]
shr edx, 6
inc edx
add eax, edx
mov dword [esi + 0x2586c], eax
jmp 0x408617
push ebp
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
mov eax, dword [esi + 0x25868]
je 0x4086f9
mov ecx, dword [esp + 0x12c]
and ecx, 0x10
test cl, cl
je 0x4086ec
dec eax
mov dword [esi + 0x25868], eax
jmp 0x408617
lea edx, [esp + 0x26c]
push edx
jmp 0x40866e
dec eax
test ebp, ebp
mov dword [esi + 0x25868], eax
je 0x40870b
push ebp
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [esi + 0x25868]
test eax, eax
jge 0x408eff
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x360
ret
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcatA]
mov ecx, dword [esp + 0x10]
xor ebp, ebp
mov eax, dword [ecx + 0x79d4]
add eax, ebp
cmp dword [eax + 0x57d8], 0x32
jge 0x40874d
mov dword [eax + 0x57d4], 0
mov edx, dword [ecx + 0x79d4]
lea eax, [edx + ebp]
mov edx, dword [edx + ebp + 0x57d0]
cmp edx, 1
jne 0x408a14
mov eax, dword [eax + 0x57d8]
test eax, eax
jl 0x408a14
cmp eax, 0x32
jge 0x4089b0
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x28]
rep stosd dword es:[edi], eax
mov ecx, 0x41
lea edi, [esp + 0x26c]
rep stosd dword es:[edi], eax
lea eax, [esi + 0x5ca5c8]
lea ecx, [esp + 0x28]
push eax
push ecx
call ebx
lea edx, [esi + 0x5ca6cc]
lea eax, [esp + 0x28]
push edx
push eax
call ebx
lea ecx, [esp + 0x28]
push 0x41a23c
push ecx
call ebx
mov edx, dword [esp + 0x10]
mov eax, dword [edx + 0x79d4]
lea ecx, [eax + ebp + 0x5fac]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, dword [esp + 0x10]
test eax, eax
jle 0x408801
mov edx, dword [edi + 0x79d4]
lea ecx, [esp + 0x28]
lea eax, [edx + ebp + 0x5fac]
push eax
push ecx
call ebx
lea edx, [esp + 0x28]
push 0x41a23c
push edx
call ebx
lea eax, [esp + 0x28]
lea ecx, [esp + 0x26c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea edx, [esp + 0x28]
push 0x41a798
push edx
call ebx
mov dword [esp + 0x14], 0
mov ecx, dword [esi + 0x25868]
mov eax, dword [esp + 0x14]
inc ecx
test eax, eax
mov dword [esi + 0x25868], ecx
jne 0x4088f7
lea eax, [esp + 0x12c]
lea ecx, [esp + 0x28]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x14], eax
je 0x408ee5
mov edx, dword [esp + 0x12c]
and edx, 0x10
test dl, dl
je 0x408877
dec dword [esi + 0x25868]
jmp 0x408828
lea eax, [esp + 0x26c]
push eax
mov eax, dword [esi + 0x25868]
mov ecx, eax
shl ecx, 6
add ecx, eax
lea edx, [esi + ecx*4 + 0x258b8]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [esp + 0x158]
push eax
mov eax, dword [esi + 0x25868]
mov ecx, eax
shl ecx, 6
add ecx, eax
lea edx, [esi + ecx*4 + 0x258b8]
push edx
call ebx
mov eax, dword [edi + 0x79d4]
mov ecx, dword [esp + 0x14c]
mov edx, dword [eax + ebp + 0x57d4]
lea eax, [eax + ebp + 0x57d4]
add edx, ecx
mov dword [eax], edx
mov edx, dword [edi + 0x79d4]
mov eax, dword [esi + 0x25868]
mov ecx, dword [edx + ebp + 0x57d8]
mov dword [esi + eax*4 + 0x51b138], ecx
jmp 0x408828
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x12c]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
je 0x408992
mov ecx, dword [esp + 0x12c]
mov eax, dword [esi + 0x25868]
and ecx, 0x10
test cl, cl
je 0x408932
dec eax
mov dword [esi + 0x25868], eax
jmp 0x408828
mov ecx, eax
lea edx, [esp + 0x26c]
shl ecx, 6
add ecx, eax
push edx
lea edx, [esi + ecx*4 + 0x258b8]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [esp + 0x158]
push eax
mov eax, dword [esi + 0x25868]
mov ecx, eax
shl ecx, 6
add ecx, eax
lea edx, [esi + ecx*4 + 0x258b8]
push edx
call ebx
mov eax, dword [edi + 0x79d4]
mov ecx, dword [esp + 0x14c]
mov edx, dword [eax + ebp + 0x57d4]
lea eax, [eax + ebp + 0x57d4]
add edx, ecx
mov dword [eax], edx
jmp 0x408828
mov edx, dword [esi + 0x25868]
mov eax, dword [esp + 0x14]
dec edx
test eax, eax
mov dword [esi + 0x25868], edx
je 0x4089ec
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x4089ec
mov cl, byte [esi + 0x5ca8d4]
test cl, cl
jne 0x4089cf
cmp eax, 0x64
setl dl
dec dl
and dl, 0xf
inc dl
mov byte [esi + 0x5ca8d4], dl
jmp 0x4089ec
cmp cl, 1
jne 0x4089db
cmp eax, 0x64
jl 0x4089ec
jmp 0x4089e5
cmp cl, 0x10
jne 0x4089ec
cmp eax, 0x64
jge 0x4089ec
mov byte [esi + 0x5ca8d4], 0x11
mov ecx, dword [esp + 0x10]
mov eax, 0x10624dd3
mov edx, dword [ecx + 0x79d4]
mul dword [edx + ebp + 0x57d4]
mov eax, dword [esi + 0x2586c]
shr edx, 6
inc edx
add eax, edx
mov dword [esi + 0x2586c], eax
add ebp, 0x8e0
cmp ebp, 0x58c0
jl 0x408732
jmp 0x40870b
cmp eax, ebx
jne 0x408bc0
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x28]
mov ebp, dword [sym.imp.KERNEL32.dll_lstrcatA]
rep stosd dword es:[edi], eax
mov ecx, 0x41
lea edi, [esp + 0x26c]
rep stosd dword es:[edi], eax
lea eax, [esi + 0x18a48]
lea ecx, [esp + 0x28]
push eax
push ecx
call ebp
lea edx, [esp + 0x28]
push 0x41a798
push edx
call ebp
mov dword [esp + 0x18], ebx
mov ecx, dword [esi + 0x25868]
mov edi, dword [esp + 0x18]
inc ecx
test edi, edi
mov dword [esi + 0x25868], ecx
jne 0x408b3c
lea eax, [esp + 0x12c]
lea ecx, [esp + 0x28]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x18], eax
je 0x408ee5
mov edx, dword [esp + 0x12c]
and edx, 0x10
test dl, dl
je 0x408ac1
dec dword [esi + 0x25868]
jmp 0x408a72
push 4
mov ecx, esi
call fcn.0040e960
test eax, eax
jne 0x408af5
xor edi, edi
lea ebx, [esi + 0x52efe0]
lea eax, [esp + 0x158]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x408ab9
inc edi
add ebx, 0x104
cmp edi, 0xa
jl 0x408ad6
mov eax, dword [esi + 0x25868]
lea ecx, [esp + 0x26c]
mov edx, eax
push ecx
shl edx, 6
add edx, eax
lea eax, [esi + edx*4 + 0x258b8]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, dword [esi + 0x25868]
lea ecx, [esp + 0x158]
mov edx, eax
push ecx
shl edx, 6
add edx, eax
lea eax, [esi + edx*4 + 0x258b8]
push eax
call ebp
jmp 0x408a72
lea ecx, [esp + 0x12c]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
je 0x408ba5
mov edx, dword [esp + 0x12c]
and edx, 0x10
test dl, dl
je 0x408b68
dec dword [esi + 0x25868]
jmp 0x408a72
push 4
mov ecx, esi
call fcn.0040e960
test eax, eax
jne 0x408af5
xor edi, edi
lea ebx, [esi + 0x52efe0]
lea eax, [esp + 0x158]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x408ab9
inc edi
add ebx, 0x104
cmp edi, 0xa
jl 0x408b7d
jmp 0x408af5
mov eax, dword [esi + 0x25868]
dec eax
test edi, edi
mov dword [esi + 0x25868], eax
je 0x40870b
push edi
jmp 0x408705
lea ecx, [esi + 0x25890]
mov dword [esp + 0x20], ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcatA]
mov dword [esp + 0x18], ecx
jmp 0x408bda
mov eax, dword [esp + 0x10]
mov edx, dword [eax + 0x79d4]
mov eax, dword [edx + 0x7d4]
test eax, eax
mov dword [esp + 0x24], eax
jl 0x408ebd
mov ecx, eax
lea eax, [ecx + ecx*8]
shl eax, 3
sub eax, ecx
shl eax, 5
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x18]
mov ecx, dword [eax + 0x79d4]
mov eax, dword [edx]
mov edx, dword [esp + 0x1c]
cmp eax, dword [ecx + edx + 0x57d8]
jne 0x408e9e
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x28]
rep stosd dword es:[edi], eax
mov ecx, 0x41
lea edi, [esp + 0x26c]
rep stosd dword es:[edi], eax
lea eax, [esi + 0x18a48]
lea ecx, [esp + 0x28]
push eax
push ecx
call ebx
mov edi, dword [esp + 0x10]
mov ebp, dword [esp + 0x1c]
mov edx, dword [edi + 0x79d4]
lea eax, [edx + ebp + 0x5fac]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
jle 0x408cad
mov ecx, dword [edi + 0x79d4]
lea eax, [esp + 0x28]
lea edx, [ecx + ebp + 0x5fac]
push edx
push eax
call ebx
lea ecx, [esp + 0x28]
push 0x41a23c
push ecx
call ebx
lea edx, [esp + 0x28]
lea eax, [esp + 0x26c]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea ecx, [esp + 0x28]
push 0x41a798
push ecx
jmp 0x408cb7
lea edx, [esp + 0x28]
push 0x41a798
push edx
call ebx
xor ebp, ebp
mov dword [esp + 0x14], ebp
mov ecx, dword [esi + 0x25868]
inc ecx
test ebp, ebp
mov dword [esi + 0x25868], ecx
jne 0x408db1
lea eax, [esp + 0x12c]
lea ecx, [esp + 0x28]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ebp, eax
cmp ebp, 0xffffffff
mov dword [esp + 0x14], ebp
je 0x408ee5
mov edx, dword [esp + 0x12c]
and edx, 0x10
test dl, dl
je 0x408d0c
dec dword [esi + 0x25868]
jmp 0x408cbf
push 4
mov ecx, esi
call fcn.0040e960
test eax, eax
jne 0x408d4c
xor edi, edi
lea ebp, [esi + 0x52efe0]
lea eax, [esp + 0x158]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x408e82
inc edi
add ebp, 0x104
cmp edi, 0xa
jl 0x408d21
mov edi, dword [esp + 0x10]
mov ebp, dword [esp + 0x14]
mov eax, dword [esi + 0x25868]
lea ecx, [esp + 0x26c]
mov edx, eax
push ecx
shl edx, 6
add edx, eax
lea eax, [esi + edx*4 + 0x258b8]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, dword [esi + 0x25868]
lea ecx, [esp + 0x158]
mov edx, eax
push ecx
shl edx, 6
add edx, eax
lea eax, [esi + edx*4 + 0x258b8]
push eax
call ebx
mov ecx, dword [edi + 0x79d4]
mov eax, dword [esp + 0x20]
mov edx, dword [esi + 0x25868]
mov ecx, dword [ecx + eax + 0x57d8]
mov dword [esi + edx*4 + 0x51b138], ecx
jmp 0x408cbf
lea edx, [esp + 0x12c]
push edx
push ebp
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
je 0x408e82
mov eax, dword [esp + 0x12c]
and eax, 0x10
test al, al
je 0x408de1
dec dword [esi + 0x25868]
jmp 0x408cbf
push 4
mov ecx, esi
call fcn.0040e960
test eax, eax
jne 0x408e1d
xor edi, edi
lea ebp, [esi + 0x52efe0]
lea ecx, [esp + 0x158]
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x408e82
inc edi
add ebp, 0x104
cmp edi, 0xa
jl 0x408df6
mov edi, dword [esp + 0x10]
mov ebp, dword [esp + 0x14]
mov eax, dword [esi + 0x25868]
lea edx, [esp + 0x26c]
mov ecx, eax
push edx
shl ecx, 6
add ecx, eax
lea edx, [esi + ecx*4 + 0x258b8]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [esp + 0x158]
push eax
mov eax, dword [esi + 0x25868]
mov ecx, eax
shl ecx, 6
add ecx, eax
lea edx, [esi + ecx*4 + 0x258b8]
push edx
call ebx
mov eax, dword [edi + 0x79d4]
mov edx, dword [esp + 0x20]
mov ecx, dword [esi + 0x25868]
mov eax, dword [eax + edx + 0x57d8]
mov dword [esi + ecx*4 + 0x51b138], eax
jmp 0x408cbf
mov eax, dword [esi + 0x25868]
dec eax
mov dword [esi + 0x25868], eax
mov eax, dword [esp + 0x14]
test eax, eax
je 0x408e9e
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x1c]
dec eax
sub edx, 0x8e0
test eax, eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x1c], edx
jge 0x408c03
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x18]
add eax, 0x8e0
add edi, 4
cmp eax, 0x58c0
mov dword [esp + 0x18], edi
mov dword [esp + 0x20], eax
jl 0x408bd6
jmp 0x40870b
mov eax, dword [esi + 0x25868]
pop edi
dec eax
mov dword [esi + 0x25868], eax
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x360
ret
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x360
ret