Function at 0x6b52c1f0
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x5c
mov ebx, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov eax, dword [sym.imp.libssp_0.dll___stack_chk_guard]
mov dword [ebp - 0x1c], eax
xor eax, eax
test ebx, ebx
je 0x6b52c480
test edi, edi
je 0x6b52c480
mov eax, dword [sym.imp.msvcrt.dll__errno]
mov dword [ebp - 0x2c], eax
call eax
mov esi, dword [ebx]
mov dword [eax], 0
test esi, esi
je 0x6b52c310
mov dword [esp + 4], esi
mov eax, dword [esi + 0x250]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
sub esp, 8
test eax, eax
je 0x6b52c538
mov edi, dword [ebx]
cmp word [edi + 0x2c], 0
lea ecx, [edi + 0x2c]
je 0x6b52c559
xor eax, eax
jmp 0x6b52c273
cmp eax, 0xff
je 0x6b52c493
mov edx, eax
add eax, 1
cmp word [edi + eax*2 + 0x2c], 0
jne 0x6b52c268
lea esi, [edx + 2]
mov edx, esi
lea eax, [edi + 0x254]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x100
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], edx
mov dword [esp + 8], ecx
mov dword [esp + 4], 0
mov dword [esp], 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
sub esp, 0x20
test eax, eax
jne 0x6b52c2e5
xor eax, eax
lea esi, [esi]
movzx ecx, word [edi + eax*2 + 0x2c]
mov edx, dword [ebx]
mov byte [edx + eax + 0x254], cl
add eax, 1
cmp eax, esi
jne 0x6b52c2d0
mov eax, dword [ebx]
mov byte [eax + 0x353], 0
mov esi, dword [ebx]
add esi, 0x254
mov eax, dword [ebp - 0x1c]
xor eax, dword [sym.imp.libssp_0.dll___stack_chk_guard]
jne 0x6b52c568
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], edi
call sym._strlen
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x34], eax
sub eax, 1
cmp eax, 0x7ffffffb
ja 0x6b52c53f
mov dword [esp + 4], 1
mov dword [esp], 0x354
call sym._calloc
mov dword [ebx], eax
test eax, eax
je 0x6b52c56d
mov eax, dword [ebp - 0x30]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
add eax, 1
mov dword [esp + 8], edi
mov dword [ebp - 0x38], eax
mov dword [esp + 0xc], eax
mov eax, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [esp + 4], 0
mov dword [esp], 0xfde9
mov dword [ebp - 0x3c], eax
call eax
mov ecx, 0xfde9
sub esp, 0x18
mov edx, eax
test eax, eax
jle 0x6b52c4a2
lea eax, [edx + edx + 0x1f]
shr eax, 4
shl eax, 4
call fcn.6b5c3520
sub esp, eax
mov dword [ebp - 0x34], edx
lea eax, [esp + 0x2f]
mov dword [esp + 0x14], edx
and eax, 0xfffffff0
mov dword [esp], ecx
mov dword [ebp - 0x30], eax
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x38]
mov dword [esp + 8], edi
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp + 4], 0
call eax
mov edx, dword [ebp - 0x34]
mov ecx, eax
sub esp, 0x18
lea eax, [edx - 1]
mov dword [ebp - 0x34], eax
mov eax, edx
test ecx, ecx
je 0x6b52c54f
mov ecx, dword [ebp - 0x30]
movzx eax, word [ecx + eax*2 - 4]
cmp ax, 0x2a
je 0x6b52c41f
mov edi, dword [ebp - 0x34]
lea edx, [ecx + edi*2]
cmp ax, 0x2f
je 0x6b52c467
cmp ax, 0x5c
je 0x6b52c467
mov dword [esp + 4], 0x6b5fb27c
mov dword [esp], edx
call sym._wcscpy
mov edi, dword [ebx]
mov eax, dword [ebp - 0x30]
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [edi + 0x250], eax
mov edi, dword [ebx]
sub esp, 8
cmp dword [edi + 0x250], 0xffffffff
jne 0x6b52c253
mov dword [esp], edi
call sym._free
mov dword [ebx], 0
mov eax, dword [ebp - 0x2c]
call eax
mov dword [eax], 0x16
jmp 0x6b52c2f6
mov dword [esp + 4], 0x6b5fb282
mov dword [esp], edx
call sym._wcscpy
jmp 0x6b52c41f
call dword [sym.imp.msvcrt.dll__errno]
xor esi, esi
mov dword [eax], 0x16
jmp 0x6b52c2f6
mov esi, 0x100
mov edx, 0x100
jmp 0x6b52c285
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x459
je 0x6b52c4f2
mov edx, dword [ebp - 0x30]
lea eax, [edx + edx + 0x21]
shr eax, 4
shl eax, 4
call fcn.6b5c3520
sub esp, eax
mov dword [ebp - 0x38], esi
xor eax, eax
mov esi, edx
lea ecx, [esp + 0x2f]
and ecx, 0xfffffff0
mov dword [ebp - 0x30], ecx
lea esi, [esi]
movsx dx, byte [edi + eax]
mov word [ecx + eax*2], dx
mov edx, eax
add eax, 1
cmp esi, edx
jne 0x6b52c4d8
mov esi, dword [ebp - 0x38]
jmp 0x6b52c3ef
mov eax, dword [ebp - 0x38]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov dword [esp], 0
call eax
sub esp, 0x18
mov edx, eax
test eax, eax
jle 0x6b52c4af
xor ecx, ecx
jmp 0x6b52c396
xor esi, esi
jmp 0x6b52c2f6
mov eax, dword [ebp - 0x2c]
call eax
mov dword [eax], 2
jmp 0x6b52c2f6
mov eax, dword [ebx]
mov dword [esp], eax
jmp 0x6b52c44c
mov esi, 1
mov edx, 1
jmp 0x6b52c285
call sym.___stack_chk_fail
mov eax, dword [ebp - 0x2c]
call eax
mov dword [eax], 0xc
jmp 0x6b52c2f6