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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59db87
mov eax, dword fs:[0]
push eax
sub esp, 0x534
mov eax, dword [0x6071d4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x530], edx
mov ebx, ecx
lea edx, [ebp - 0x529]
call fcn.00516610
test eax, eax
js 0x5165ee
cmp byte [ebp - 0x529], 0
je 0x5165ee
xor eax, eax
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
mov dword [ebp - 4], eax
lea eax, [ebp - 0x28]
cmp eax, ebx
je 0x516230
push 0xffffffffffffffff
push 0
push ebx
mov ecx, eax
call fcn.004a99e0
mov ecx, dword [ebx + 0x10]
test ecx, ecx
je 0x51625d
cmp dword [ebx + 0x14], 8
jb 0x516241
mov eax, dword [ebx]
jmp 0x516243
mov eax, ebx
movzx eax, word [eax + ecx*2 - 2]
cmp eax, 0x5c
je 0x51625d
cmp eax, 0x2f
je 0x51625d
push 0x5c
push 1
mov ecx, ebx
call fcn.004a97a0
push 0x5e274c
mov edx, ebx
lea ecx, [ebp - 0x70]
call fcn.004c50c0
add esp, 4
mov esi, eax
lea eax, [ebp - 0x28]
cmp eax, esi
je 0x5162aa
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x51628d
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.004a9d40
xor eax, eax
mov dword [ebp - 0x14], 7
push esi
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
call fcn.004a9850
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x5c]
cmp eax, 8
jb 0x5162c3
inc eax
lea ecx, [ebp - 0x70]
push eax
push dword [ebp - 0x70]
call fcn.004a9d40
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp dword [ebp - 0x14], 8
lea ecx, [ebp - 0x2d8]
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov edi, eax
mov dword [ebp - 0x534], edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x51630d
cmp edi, 0xffffffff
je 0x516303
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov esi, 0xffffffea
jmp 0x5165d5
cmp edi, 0xffffffff
je 0x5165d2
nop word [eax + eax]
xor eax, eax
mov dword [ebp - 0x44], 7
mov dword [ebp - 0x48], 0
mov word [ebp - 0x58], ax
cmp word [ebp - 0x2ac], ax
jne 0x516341
xor ecx, ecx
jmp 0x51635f
lea ecx, [ebp - 0x2ac]
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x516350
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x2ac]
push eax
lea ecx, [ebp - 0x58]
call fcn.004a96a0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x58]
mov esi, dword [ebp - 0x44]
cmp esi, 8
mov edi, dword [ebp - 0x58]
mov edx, dword [ebp - 0x48]
cmovae ecx, edi
push 1
push 0x5dfa30
call fcn.004af3c0
add esp, 8
test eax, eax
je 0x51656c
cmp esi, 8
lea ecx, [ebp - 0x58]
push 2
cmovae ecx, edi
push 0x5e2750
call fcn.004af3c0
add esp, 8
test eax, eax
je 0x51656c
lea eax, [ebp - 0x58]
mov edx, ebx
push eax
lea ecx, [ebp - 0x70]
call fcn.004b0470
add esp, 4
mov byte [ebp - 4], 3
test byte [ebp - 0x2d8], 0x10
je 0x5164e0
xor eax, eax
mov dword [ebp - 0x2c], 7
push 0xffffffffffffffff
push eax
mov word [ebp - 0x40], ax
lea ecx, [ebp - 0x40]
lea eax, [ebp - 0x70]
mov dword [ebp - 0x30], 0
push eax
call fcn.004a99e0
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x30]
test ecx, ecx
je 0x516432
cmp dword [ebp - 0x2c], 8
lea eax, [ebp - 0x40]
cmovae eax, dword [ebp - 0x40]
movzx eax, word [eax + ecx*2 - 2]
cmp eax, 0x5c
je 0x516432
cmp eax, 0x2f
je 0x516432
push 0x5c
push 1
lea ecx, [ebp - 0x40]
call fcn.004a97a0
push 0x5e274c
lea edx, [ebp - 0x40]
lea ecx, [ebp - 0x88]
call fcn.004c50c0
add esp, 4
lea ecx, [ebp - 0x40]
push eax
call fcn.004af000
mov eax, dword [ebp - 0x74]
cmp eax, 8
jb 0x51646c
inc eax
lea ecx, [ebp - 0x88]
push eax
push dword [ebp - 0x88]
call fcn.004a9d40
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp dword [ebp - 0x2c], 8
lea ecx, [ebp - 0x528]
lea eax, [ebp - 0x40]
cmovae eax, dword [ebp - 0x40]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp esi, 0xffffffff
je 0x5164a3
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp edi, 5
je 0x5164d6
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
test ecx, ecx
js 0x5164b6
cmp eax, ecx
jge 0x5164d6
mov edx, dword [ebp - 0x530]
inc eax
push eax
push ecx
push 1
lea ecx, [ebp - 0x70]
call fcn.005161b0
mov esi, eax
add esp, 0xc
test esi, esi
js 0x5165ac
lea ecx, [ebp - 0x40]
call fcn.004a9470
jmp 0x516557
cmp dword [ebp - 0x5c], 8
lea eax, [ebp - 0x70]
mov dword [ebp - 0x538], 0
lea ecx, [ebp - 0x540]
cmovae eax, dword [ebp - 0x70]
push eax
mov dword [ebp - method.WaJson.virtual_0], vtable.WaJson.0
mov byte [ebp - 0x538], 0
mov dword [ebp - 0x53c], 5
call fcn.004ad7b0
mov edi, dword [ebp - 0x530]
lea ecx, [ebp - 0x540]
mov byte [ebp - 4], 5
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 0x68]
mov ecx, esi
call dword [0x5a143c]
mov ecx, edi
call esi
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x540]
mov dword [ebp - method.WaJson.virtual_0], vtable.WaJson.0
call fcn.004ab230
mov eax, dword [ebp - 0x5c]
cmp eax, 8
jb 0x51656c
inc eax
lea ecx, [ebp - 0x70]
push eax
push dword [ebp - 0x70]
call fcn.004a9d40
mov edi, dword [ebp - 0x534]
lea eax, [ebp - 0x2d8]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
mov byte [ebp - 4], 0
mov esi, eax
mov ecx, dword [ebp - 0x44]
cmp ecx, 8
jb 0x51659b
inc ecx
push ecx
push dword [ebp - 0x58]
lea ecx, [ebp - 0x58]
call fcn.004a9d40
test esi, esi
jne 0x516320
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x5165d5
push dword [ebp - 0x534]
call dword [sym.imp.KERNEL32.dll_FindClose]
lea ecx, [ebp - 0x40]
call fcn.004a9470
lea ecx, [ebp - 0x70]
call fcn.004a9470
lea ecx, [ebp - 0x58]
call fcn.004a9470
jmp 0x5165d5
or esi, 0xffffffff
mov ecx, dword [ebp - 0x14]
cmp ecx, 8
jb 0x5165ea
inc ecx
push ecx
push dword [ebp - 0x28]
lea ecx, [ebp - 0x28]
call fcn.004a9d40
mov eax, esi
jmp 0x5165f3
mov eax, 0xffffffe4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0053b526
mov esp, ebp
pop ebp
ret