Function at 0x4c1720
Capabilities:
Enumerate files on windows
Read file on windows

Disassembly:
mov eax, 0x125c
call fcn.00563290
push ebp
push esi
mov ebp, ecx
push edi
xor esi, esi
push ebp
mov dword [esp + 0x18], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [ebp + 0xa0]
mov dword [ebp + 0xa4], esi
cmp edi, esi
jne 0x4c175f
push ebp
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x125c
ret
mov ecx, 0x52
xor eax, eax
rep stosd dword es:[edi], eax
mov edi, 0x582c20
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x264]
mov eax, ecx
mov esi, edi
mov edi, dword [ebp + 0xa0]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp + 0xa4]
lea ecx, [ebp + 0x18]
push ecx
push 0x5965b8
push str._slanguages_s_.lng
inc edi
push 0x1001
push edx
mov dword [ebp + 0xa4], edi
call dword [sym.imp.MSVCRT.dll__snprintf]
add esp, 0x14
lea eax, [esp + 0x124]
lea ecx, [esp + 0x264]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x18], eax
je 0x4c1a0f
push ebx
lea edx, [esp + 0x154]
lea eax, [esp + 0x28]
push edx
push 0x5965b8
push str._slanguages_s
push 0xff
push eax
call dword [sym.imp.MSVCRT.dll__snprintf]
lea ecx, [esp + 0x3c]
push 0x581660
push ecx
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 0x1c
test esi, esi
je 0x4c19e3
mov edi, dword [sym.imp.MSVCRT.dll_fread]
push esi
push 1
lea edx, [esp + 0x18]
push 4
push edx
call edi
add esp, 0x10
cmp eax, 1
jne 0x4c19d9
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_IsValidCodePage]
test eax, eax
push esi
je 0x4c19da
push 1
lea ecx, [esp + 0x28]
push 8
push ecx
call edi
add esp, 0x10
cmp eax, 1
jne 0x4c19d9
mov eax, dword [esp + 0x20]
test eax, eax
jl 0x4c19d9
mov eax, dword [esp + 0x24]
test eax, eax
jl 0x4c19d9
lea edx, [esp + 0x268]
mov ecx, ebp
push edx
push esi
call fcn.004c1a30
test eax, eax
push esi
je 0x4c19da
call dword [sym.imp.MSVCRT.dll_fclose]
mov esi, dword [sym.imp.MSVCRT.dll_strstr]
lea eax, [esp + 0x26c]
push str.language
push eax
call esi
mov ebx, eax
add esp, 0xc
test ebx, ebx
je 0x4c19e3
add ebx, 9
push 0x581610
push ebx
call esi
add esp, 8
test eax, eax
je 0x4c18e6
mov byte [eax], 0
inc eax
push eax
call dword [sym.imp.MSVCRT.dll_atoi]
add esp, 4
mov dword [esp + 0x18], eax
cmp byte [ebx], 0
je 0x4c19e3
mov eax, dword [ebp + 0xa4]
xor edi, edi
test eax, eax
jle 0x4c194c
mov eax, dword [ebp + 0xa0]
mov dword [esp + 0x14], eax
mov esi, ebx
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x4c192b
test cl, cl
je 0x4c1927
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x4c192b
add eax, 2
add esi, 2
test cl, cl
jne 0x4c1907
xor eax, eax
jmp 0x4c1930
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4c194c
mov eax, dword [esp + 0x14]
mov ecx, dword [ebp + 0xa4]
inc edi
add eax, 0x148
cmp edi, ecx
mov dword [esp + 0x14], eax
jl 0x4c1905
cmp edi, dword [ebp + 0xa4]
jl 0x4c19e3
mov ecx, dword [ebp + 0xa0]
mov edx, dword [esp + 0x10]
lea eax, [edi + edi*4]
push 0x3f
push ebx
lea esi, [edi + eax*8]
mov edi, dword [sym.imp.MSVCRT.dll_strncpy]
shl esi, 3
mov dword [ecx + esi + 0x140], edx
mov eax, dword [ebp + 0xa0]
mov ecx, dword [esp + 0x20]
mov dword [eax + esi + 0x144], ecx
mov edx, dword [ebp + 0xa0]
add edx, esi
push edx
call edi
mov eax, dword [ebp + 0xa0]
lea ecx, [esp + 0x34]
push 0xff
push ecx
mov byte [eax + esi + 0x3f], 0
mov edx, dword [ebp + 0xa0]
lea eax, [edx + esi + 0x40]
push eax
call edi
mov ecx, dword [ebp + 0xa0]
add esp, 0x18
mov byte [ecx + esi + 0x13f], 0
mov eax, dword [ebp + 0xa4]
inc eax
mov dword [ebp + 0xa4], eax
jmp 0x4c19e3
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov esi, dword [esp + 0x1c]
lea edx, [esp + 0x128]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
je 0x4c1a07
cmp dword [ebp + 0xa4], 0x40
jl 0x4c17e1
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
pop ebx
push ebp
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
mov eax, 1
pop ebp
add esp, 0x125c
ret