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

Disassembly:
sub esp, 0x258
push ebx
push esi
push edi
mov edi, ecx
xor ebx, ebx
mov dword [esp + 0xc], edi
mov dword [esp + 0x14], ebx
call fcn.0042cfd0
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [edi + 0x18]
cmp esi, ebx
je 0x42ca54
mov eax, dword [esi + 0xd0]
cmp eax, ebx
je 0x42ca31
push eax
call fcn.004c2eb0
add esp, 4
mov dword [esi + 0xd0], ebx
mov ecx, dword [esi + 0x15c]
cmp ecx, ebx
je 0x42ca48
push 1
call fcn.0040ae20
mov dword [esi + 0x15c], ebx
push esi
call fcn.004c2eb0
add esp, 4
mov dword [edi + 0x18], ebx
push 0x5965b8
push str._sconfig.srv
lea eax, [esp + 0x28]
push 0x103
push eax
call dword [sym.imp.MSVCRT.dll__snprintf]
add esp, 0x10
lea ecx, [esp + 0x124]
lea edx, [esp + 0x20]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x1c], eax
je 0x42cdb0
push ebp
test byte [esp + 0x128], 0x10
jne 0x42cd89
lea eax, [esp + 0x154]
lea ecx, [esp + 0x24]
push eax
push 0x5965b8
push str._sconfig_s
push 0x103
push ecx
call dword [sym.imp.MSVCRT.dll__snprintf]
lea edx, [esp + 0x38]
push 0x581660
push edx
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebp, eax
add esp, 0x1c
cmp ebp, ebx
je 0x42cd89
push 0x160
call fcn.004c2e90
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x42cb44
mov ecx, 0x58
xor eax, eax
mov edi, esi
push ebp
rep stosd dword es:[edi], eax
mov edi, dword [sym.imp.MSVCRT.dll_fread]
push 1
push 0x160
push esi
call edi
add esp, 0x10
cmp eax, 1
je 0x42cb53
mov eax, ebx
mov dword [esi + 0xd0], ebx
cmp eax, ebx
je 0x42cb31
push eax
call fcn.004c2eb0
add esp, 4
mov dword [esi + 0xd0], ebx
mov ecx, dword [esi + 0x15c]
cmp ecx, ebx
je 0x42cd79
jmp 0x42cd6c
push ebp
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
jmp 0x42cd89
mov al, byte [esi]
mov byte [esi + 0x3f], bl
cmp al, bl
mov byte [esi + 0xbf], bl
mov byte [esi + 0x117], bl
mov dword [esi + 0xd0], ebx
mov dword [esi + 0x15c], ebx
je 0x42cd49
cmp byte [esi + 0x40], bl
je 0x42cd49
mov eax, dword [esi + 0xd4]
cmp eax, 1
jl 0x42cd49
cmp eax, 0x40
jg 0x42cd49
lea eax, [eax + eax*4]
shl eax, 5
push eax
call fcn.004c2e90
add esp, 4
cmp eax, ebx
mov dword [esi + 0xd0], eax
push ebp
jne 0x42cbe1
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, dword [esi + 0xd0]
add esp, 4
cmp eax, ebx
je 0x42cbd5
push eax
call fcn.004c2eb0
add esp, 4
mov dword [esi + 0xd0], ebx
mov ecx, dword [esi + 0x15c]
cmp ecx, ebx
je 0x42cc35
jmp 0x42cc28
mov ecx, dword [esi + 0xd4]
push 1
lea ecx, [ecx + ecx*4]
shl ecx, 5
push ecx
push eax
call edi
add esp, 0x10
cmp eax, 1
push ebp
je 0x42cc43
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, dword [esi + 0xd0]
add esp, 4
cmp eax, ebx
je 0x42cc1e
push eax
call fcn.004c2eb0
add esp, 4
mov dword [esi + 0xd0], ebx
mov ecx, dword [esi + 0x15c]
cmp ecx, ebx
je 0x42cc35
push 1
call fcn.0040ae20
mov dword [esi + 0x15c], ebx
push esi
call fcn.004c2eb0
add esp, 4
jmp 0x42cd89
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, dword [esi + 0xd4]
mov ecx, dword [esi + 0xd0]
add esp, 4
lea edx, [eax + eax*4]
shl edx, 5
call fcn.004339d0
mov eax, dword [esi + 0xd4]
mov dword [esp + 0x1c], ebx
cmp eax, ebx
mov dword [esp + 0x14], ebx
jle 0x42cd22
xor ebp, ebp
mov edx, dword [esi + 0xd0]
mov byte [edx + ebp + 0x83], bl
mov eax, dword [esi + 0xd0]
mov byte [eax + ebp + 0x3f], bl
mov ecx, dword [esi + 0xd0]
mov dword [ecx + ebp + 0x9c], ebx
mov edx, dword [esi + 0xd0]
mov ecx, dword [edx + ebp + 0x90]
lea eax, [edx + ebp + 0x90]
cmp ecx, 1
jne 0x42ccba
mov dword [eax], ebx
mov ecx, dword [esi + 0xd0]
mov eax, ebp
add eax, ecx
lea edi, [esi + 0xd8]
mov dl, byte [edi]
mov cl, dl
cmp dl, byte [eax]
jne 0x42ccee
cmp cl, bl
je 0x42ccea
mov dl, byte [edi + 1]
mov cl, dl
cmp dl, byte [eax + 1]
jne 0x42ccee
add edi, 2
add eax, 2
cmp cl, bl
jne 0x42ccca
xor eax, eax
jmp 0x42ccf3
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x42ccff
mov dword [esp + 0x1c], 1
mov eax, dword [esp + 0x14]
mov ecx, dword [esi + 0xd4]
inc eax
add ebp, 0xa0
cmp eax, ecx
mov dword [esp + 0x14], eax
jl 0x42cc7b
cmp dword [esp + 0x1c], ebx
jne 0x42cd28
mov byte [esi + 0xd8], bl
mov eax, dword [esp + 0x18]
cmp eax, ebx
jne 0x42cd3d
mov eax, dword [esp + 0x10]
mov dword [esp + 0x18], esi
mov dword [eax + 0x18], esi
jmp 0x42cd89
mov dword [eax + 0x15c], esi
mov dword [esp + 0x18], esi
jmp 0x42cd89
mov eax, dword [esi + 0xd0]
cmp eax, ebx
je 0x42cd62
push eax
call fcn.004c2eb0
add esp, 4
mov dword [esi + 0xd0], ebx
mov ecx, dword [esi + 0x15c]
cmp ecx, ebx
je 0x42cd79
push 1
call fcn.0040ae20
mov dword [esi + 0x15c], ebx
push esi
call fcn.004c2eb0
push ebp
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 8
mov esi, dword [esp + 0x20]
lea ecx, [esp + 0x128]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x42ca92
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov edi, dword [esp + 0x10]
pop ebp
push edi
mov dword [edi + 0x1c], ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebx
add esp, 0x258
ret