Function at 0x509820
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x626329
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x4a0
push ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 0x10], esp
xor ebx, ebx
push 0x6c
mov dword [ebp - 0x38], esi
mov dword [ebp - 4], ebx
call fcn.005feedc
mov ecx, eax
add esp, 4
mov dword [ebp - 0x24], ecx
cmp ecx, ebx
mov byte [ebp - 4], 1
je 0x50986c
call fcn.00485030
mov ebx, eax
mov ecx, ebx
mov byte [ebp - 4], 0
call fcn.00485170
mov eax, dword [0x6d1c98]
lea ecx, [ebx + 0x58]
push eax
push 0x6a00a0
push ecx
call fcn.005fb90b
mov edi, dword [esi + 0x1c]
add esi, 0x14
add esp, 0xc
mov ecx, esi
lea edx, [edi + 1]
push 0xffffffffffffffff
push edx
call fcn.00509f50
mov eax, dword [esi + 4]
push 0x6c
mov dword [eax + edi*4], ebx
call fcn.005feedc
mov ecx, eax
add esp, 4
mov dword [ebp - 0x24], ecx
test ecx, ecx
mov byte [ebp - 4], 2
je 0x5098c7
call fcn.00485030
mov edi, eax
jmp 0x5098c9
xor edi, edi
mov ecx, edi
mov byte [ebp - 4], 0
mov dword [edi + 0x68], 2
call fcn.00485170
mov ecx, dword [0x6d1c94]
lea edx, [edi + 0x58]
push ecx
push 0x6a00a0
push edx
call fcn.005fb90b
mov ebx, dword [esi + 8]
add esp, 0xc
mov ecx, esi
lea eax, [ebx + 1]
push 0xffffffffffffffff
push eax
call fcn.00509f50
mov ecx, dword [esi + 4]
mov edx, dword [ebp - 0x38]
mov dword [ecx + ebx*4], edi
mov al, byte [edx + 4]
test al, al
je 0x509a21
xor ebx, ebx
xor ecx, ecx
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x28], ebx
mov word [ebp - 0x2c], bx
mov eax, dword [edx + 8]
mov byte [ebp - 4], 3
cmp eax, ebx
jne 0x509933
lea eax, [edx + 0xc]
mov edx, str._sq_.dt
test edx, edx
je 0x5099f4
cmp eax, ebx
je 0x5099f4
push eax
lea ecx, [ebp - 0x20]
call fcn.0040e5a0
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 4
call fcn.00401070
push str._sq_.dt
lea ecx, [ebp - 0x4c]
call fcn.00402380
mov eax, dword [ebp - 0x20]
mov byte [ebp - 4], 5
cmp eax, ebx
jne 0x509978
lea eax, [ebp - 0x1c]
mov esi, dword [ebp - 0x44]
push eax
call fcn.005e639f
lea esi, [eax + esi + 2]
lea edi, [esi + esi]
push edi
call fcn.005feedc
mov edx, eax
add esp, 8
cmp edx, ebx
mov dword [ebp - 0x30], edx
je 0x5099d9
mov ecx, edi
mov edi, edx
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
lea ecx, [ebp - 0x20]
call fcn.00402400
push eax
lea ecx, [ebp - 0x4c]
call fcn.00402400
push eax
mov eax, dword [ebp - 0x30]
push esi
push eax
call fcn.005e632f
mov ecx, dword [ebp - 0x30]
push ecx
call fcn.005e639f
add esp, 0x14
mov dword [ebp - 0x28], eax
lea ecx, [ebp - 0x4c]
mov byte [ebp - 4], 4
call fcn.00401070
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 3
call fcn.00401070
mov ecx, dword [ebp - 0x30]
cmp ecx, ebx
mov eax, ecx
jne 0x5099fd
lea eax, [ebp - 0x2c]
lea edx, [ebp - 0x4ac]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp - 0x24], edi
jne 0x509a32
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 0
call fcn.00401070
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x480]
push 0x5f
push eax
call fcn.005e62ef
mov esi, eax
add esp, 8
cmp esi, ebx
je 0x509bc9
mov cx, word [esi + 2]
add esi, 2
push ecx
call fcn.005e87e1
add esp, 4
test eax, eax
je 0x509bc9
push esi
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x18], ebx
mov word [ebp - 0x1c], bx
call fcn.00402410
mov eax, dword [ebp - 0x20]
mov byte [ebp - 4], 6
cmp eax, ebx
jne 0x509a86
lea eax, [ebp - 0x1c]
push 0x2e
push eax
call fcn.005e699b
add esp, 8
cmp eax, ebx
je 0x509bbd
mov word [eax], bx
mov eax, dword [ebp - 0x20]
cmp eax, ebx
jne 0x509aa6
lea eax, [ebp - 0x1c]
push eax
call fcn.005e7e2c
mov esi, eax
add esp, 4
cmp esi, 2
jle 0x509bbd
push 0x6c
call fcn.005feedc
mov ecx, eax
add esp, 4
mov dword [ebp - 0x3c], ecx
cmp ecx, ebx
mov byte [ebp - 4], 7
je 0x509add
call fcn.00485030
mov ecx, eax
mov dword [ebp - 0x34], ecx
jmp 0x509ae2
mov dword [ebp - 0x34], ebx
mov ecx, ebx
mov byte [ebp - 4], 6
mov dword [ecx + 0x68], esi
call fcn.00485170
mov edi, 2
mov ebx, dword [ebp - 0x38]
cmp edi, dword [ebx + 0x1c]
jge 0x509b09
mov edx, dword [ebx + 0x18]
mov eax, dword [edx + edi*4]
cmp esi, dword [eax + 0x68]
jl 0x509b09
inc edi
jmp 0x509af3
mov esi, dword [ebx + 0x1c]
add ebx, 0x14
cmp edi, esi
mov dword [ebp - 0x14], 1
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x40], esi
push 0xffffffffffffffff
jl 0x509b2f
lea ecx, [edi + 1]
push ecx
mov ecx, ebx
call fcn.00509f50
jmp 0x509b9f
lea edx, [esi + 1]
mov ecx, ebx
push edx
call fcn.00509f50
mov eax, dword [ebx + 4]
mov ecx, 1
lea eax, [eax + esi*4]
mov edx, ecx
dec ecx
test edx, edx
je 0x509b51
add eax, 4
jmp 0x509b45
mov edx, dword [ebp - 0x40]
mov ecx, edi
mov eax, dword [ebx + 4]
lea esi, [edi*4]
shl ecx, 0x1e
sub ecx, edi
add ecx, edx
lea edx, [esi + eax]
shl ecx, 2
push ecx
mov ecx, dword [ebp - 0x14]
add edi, ecx
push edx
lea edx, [eax + edi*4]
push edx
call fcn.005e7440
mov eax, dword [ebx + 4]
mov ecx, dword [ebp - 0x14]
add esi, eax
add esp, 0xc
xor eax, eax
mov edi, esi
mov edx, ecx
rep stosd dword es:[edi], eax
mov eax, edx
dec edx
test eax, eax
je 0x509b9c
add esi, 4
jmp 0x509b90
mov edi, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x14]
mov ecx, eax
dec eax
test ecx, ecx
mov dword [ebp - 0x14], eax
je 0x509bb8
mov edx, dword [ebx + 4]
mov eax, dword [ebp - 0x34]
mov dword [edx + edi*4], eax
inc edi
jmp 0x509b9f
mov edi, dword [ebp - 0x24]
xor ebx, ebx
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 3
call fcn.00401070
lea ecx, [ebp - 0x4ac]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x509a32
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x509a15