Function at 0x40a880
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x84
mov eax, dword [0x59ece0]
xor eax, esp
mov dword [esp + 0x80], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, ecx
mov dword [esp + 0x10], eax
mov al, byte [edi]
test al, al
jne 0x40aad6
cmp dword [edi + 0x2a8], 0
je 0x40ad39
test al, al
jne 0x40aad6
mov esi, dword [edi + 0x2a4]
mov eax, dword [edi + 0x298]
add esi, dword [edi + 0x2a8]
xor ebx, ebx
test eax, eax
je 0x40a8fb
mov eax, dword [eax]
test eax, eax
jne 0x40a8f9
push 3
lea ecx, [esp + 0x1c]
call fcn.0049c2d1
lea ecx, [esp + 0x18]
call fcn.0049c2f9
jmp 0x40a8fb
mov ebx, dword [eax]
dec esi
test ebx, ebx
je 0x40a924
mov ebx, dword [ebx]
test ebx, ebx
jne 0x40a91e
push 3
lea ecx, [esp + 0x18]
call fcn.0049c2d1
lea ecx, [esp + 0x14]
call fcn.0049c2f9
xor eax, eax
jmp 0x40a92a
mov ebx, dword [ebx]
test ebx, ebx
jne 0x40a928
xor eax, eax
jmp 0x40a92a
mov eax, dword [ebx]
mov ecx, dword [eax + 8]
cmp ecx, esi
ja 0x40a933
sub esi, ecx
mov ecx, dword [eax + 4]
mov edx, dword [ecx + esi*4]
push 0xffffffffffffffff
push 0
lea ebx, [edi + 0x258]
push edx
mov ecx, ebx
call fcn.00405b50
mov eax, dword [edi + 0x2a8]
test eax, eax
je 0x40a9a6
mov ecx, dword [edi + 0x2a4]
lea eax, [eax + ecx - 1]
mov ecx, dword [edi + 0x2a0]
cmp ecx, eax
ja 0x40a96b
sub eax, ecx
mov edx, dword [edi + 0x29c]
mov esi, dword [edx + eax*4]
cmp dword [esi + 0x14], 8
jb 0x40a985
mov eax, dword [esi]
push eax
call fcn.0049d0c3
add esp, 4
xor ecx, ecx
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], 0
mov word [esi], cx
dec dword [edi + 0x2a8]
jne 0x40a9a6
mov dword [edi + 0x2a4], ecx
push 0xffffffffffffffff
xor esi, esi
push esi
xor edx, edx
push ebx
lea ecx, [esp + 0x28]
mov dword [esp + 0x3c], 7
mov dword [esp + 0x38], esi
mov word [esp + 0x28], dx
call fcn.00405b50
cmp dword [edi + 0x28c], esi
jne 0x40aa61
push 1
xor eax, eax
mov ebx, 7
push 0x597954
lea ecx, [esp + 0x40]
mov dword [esp + 0x54], ebx
mov dword [esp + 0x50], esi
mov word [esp + 0x40], ax
call fcn.00405c50
lea ecx, [esp + 0x38]
push ecx
lea edx, [esp + 0x74]
push edx
lea ecx, [esp + 0x24]
call fcn.004088b0
push 0xffffffffffffffff
push esi
push eax
lea ecx, [esp + 0x28]
call fcn.00405b50
mov esi, 8
cmp dword [esp + 0x84], esi
jb 0x40aa33
mov eax, dword [esp + 0x70]
push eax
call fcn.0049d0c3
add esp, 4
xor ecx, ecx
mov dword [esp + 0x84], ebx
mov dword [esp + 0x80], 0
mov word [esp + 0x70], cx
cmp dword [esp + 0x4c], esi
jb 0x40aa9f
mov edx, dword [esp + 0x38]
push edx
call fcn.0049d0c3
add esp, 4
jmp 0x40aa9f
lea eax, [edi + 0x27c]
push eax
lea eax, [esp + 0x74]
push eax
lea ecx, [esp + 0x24]
call fcn.004088b0
push 0xffffffffffffffff
push esi
push eax
lea ecx, [esp + 0x28]
call fcn.00405b50
cmp dword [esp + 0x84], 8
jb 0x40aa9a
mov ecx, dword [esp + 0x70]
push ecx
call fcn.0049d0c3
add esp, 4
mov esi, 8
mov ecx, dword [esp + 0x1c]
cmp dword [esp + 0x30], esi
jae 0x40aaad
lea ecx, [esp + 0x1c]
lea eax, [edi + 4]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [edi + 0x254], eax
mov byte [edi], 1
cmp dword [esp + 0x30], esi
jb 0x40ab02
mov edx, dword [esp + 0x1c]
push edx
call fcn.0049d0c3
add esp, 4
jmp 0x40ab02
lea eax, [edi + 4]
push eax
mov eax, dword [edi + 0x254]
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x40ab02
mov ecx, dword [edi + 0x254]
push ecx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov dword [edi + 0x254], 0xffffffff
cmp dword [edi + 0x254], 0xffffffff
jne 0x40abac
xor edx, edx
lea esi, [edi + 0x27c]
lea eax, [esp + 0x1c]
mov byte [edi], 0
mov dword [esp + 0x30], 7
mov dword [esp + 0x2c], 0
mov word [esp + 0x1c], dx
cmp esi, eax
je 0x40a8a6
mov ebx, 8
cmp dword [esi + 0x14], ebx
jb 0x40ab50
mov ecx, dword [esi]
push ecx
call fcn.0049d0c3
add esp, 4
xor edx, edx
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], 0
mov word [esi], dx
cmp dword [esp + 0x30], ebx
jae 0x40ab93
mov eax, dword [esp + 0x2c]
lea ecx, [eax + eax + 2]
push ecx
lea edx, [esp + 0x20]
push edx
push esi
call fcn.0049d4c0
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x3c]
add esp, 0xc
mov dword [esi + 0x10], ecx
mov dword [esi + 0x14], edx
jmp 0x40a8a6
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x30]
mov dword [esi], eax
mov dword [esi + 0x10], ecx
mov dword [esi + 0x14], edx
jmp 0x40a8a6
xor esi, esi
xor eax, eax
lea ebx, [edi + 0x30]
mov word [esp + 0x38], ax
mov eax, ebx
mov dword [esp + 0x4c], 7
mov dword [esp + 0x48], esi
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x40abd0
sub eax, edx
sar eax, 1
push eax
push ebx
lea ecx, [esp + 0x40]
call fcn.00405c50
push 0xffffffffffffffff
xor ecx, ecx
push esi
lea edx, [esp + 0x40]
mov word [esp + 0x5c], cx
push edx
lea ecx, [esp + 0x60]
mov dword [esp + 0x74], 7
mov dword [esp + 0x70], esi
call fcn.00405b50
cmp dword [esp + 0x4c], 8
jb 0x40ac22
mov eax, dword [esp + 0x38]
push eax
call fcn.0049d0c3
add esp, 4
push edi
lea esi, [esp + 0x58]
call fcn.00418cf0
test al, al
je 0x40ac4d
cmp dword [esp + 0x68], 8
jb 0x40a8a6
mov ecx, dword [esp + 0x54]
push ecx
call fcn.0049d0c3
add esp, 4
jmp 0x40a8a6
xor esi, esi
xor edx, edx
mov eax, ebx
mov word [esp + 0x38], dx
mov dword [esp + 0x4c], 7
mov dword [esp + 0x48], esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x40ac67
sub eax, edx
sar eax, 1
push eax
push ebx
lea ecx, [esp + 0x40]
call fcn.00405c50
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x74]
push ecx
lea ecx, [edi + 0x258]
call fcn.004088b0
push 0xffffffffffffffff
push esi
push eax
lea ecx, [esp + 0x60]
call fcn.00405b50
mov ebx, 8
cmp dword [esp + 0x84], ebx
jb 0x40acbe
mov edx, dword [esp + 0x70]
push edx
call fcn.0049d0c3
add esp, 4
xor eax, eax
mov dword [esp + 0x84], 7
mov dword [esp + 0x80], esi
mov word [esp + 0x70], ax
cmp dword [esp + 0x4c], ebx
jb 0x40acea
mov ecx, dword [esp + 0x38]
push ecx
call fcn.0049d0c3
add esp, 4
test byte [edi + 4], 0x10
je 0x40ad14
cmp byte [edi + 0x274], 0
je 0x40ad0b
lea edx, [esp + 0x54]
lea esi, [edi + 0x298]
push edx
call fcn.0040ae10
xor esi, esi
test byte [edi + 0x278], 2
jmp 0x40ad1b
test byte [edi + 0x278], 1
jne 0x40ad67
cmp dword [esp + 0x68], ebx
jb 0x40a8a6
mov eax, dword [esp + 0x54]
push eax
call fcn.0049d0c3
add esp, 4
jmp 0x40a8a6
mov eax, dword [esp + 0x10]
xor ecx, ecx
mov dword [eax + 0x14], 7
mov dword [eax + 0x10], 0
mov word [eax], cx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x80]
xor ecx, esp
call fcn.0049d4b1
mov esp, ebp
pop ebp
ret 4
mov edi, dword [esp + 0x10]
push 0xffffffffffffffff
push esi
lea eax, [esp + 0x5c]
xor edx, edx
mov dword [edi + 0x14], 7
mov dword [edi + 0x10], esi
push eax
mov ecx, edi
mov word [edi], dx
call fcn.00405b50
cmp dword [esp + 0x68], ebx
jb 0x40ad9c
mov ecx, dword [esp + 0x54]
push ecx
call fcn.0049d0c3
add esp, 4
mov ecx, dword [esp + 0x8c]
mov eax, edi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0049d4b1
mov esp, ebp
pop ebp
ret 4