Function at 0x5c7e50
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x68b40d
mov eax, dword fs:[0]
push eax
sub esp, 0x58
mov eax, dword [0x745694]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
push 0
push 0x80
push 3
push 0
push 7
push accept
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x5c7f70
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.005c07e0
add esp, 8
push 0x12
push str.CreateFile_error:
push 0
lea ecx, [ebp - 0x40]
mov dword [ebp - 4], 0
call fcn.005a5ba0
mov ecx, 0x7450c8
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x28], xmm0
movq xmm0, qword [eax + 0x10]
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
lea eax, [ebp - 0x28]
push eax
movq qword [ebp - 0x18], xmm0
call fcn.005a3660
mov edx, dword [ebp - 0x14]
cmp edx, 0x10
jb 0x5c7f33
mov ecx, dword [ebp - 0x28]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x5c7f29
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x5c80e6
push edx
push ecx
call fcn.0065cc27
add esp, 8
mov edx, dword [ebp - 0x2c]
cmp edx, 0x10
jb 0x5c80c9
mov ecx, dword [ebp - 0x40]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x5c7f61
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x5c80e6
push edx
push ecx
call fcn.0065cc27
add esp, 8
jmp 0x5c80c9
lea eax, [ebp - 0x60]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x5c802f
mov eax, dword [ebp + 0x10]
cdq
mov ecx, eax
cmp dword [ebp - 0x5c], edx
jg 0x5c802f
mov eax, dword [ebp - 0x60]
jl 0x5c7f9f
cmp eax, ecx
ja 0x5c802f
inc eax
push eax
push dword [edi]
mov dword [edi + 4], eax
call fcn.006637d2
add esp, 8
mov dword [edi], eax
lea ecx, [ebp - 0x64]
push 0
push ecx
push dword [ebp - 0x60]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x5c7fe8
mov ecx, dword [ebp - 0x60]
xor eax, eax
cmp dword [ebp - 0x64], ecx
jne 0x5c7fe8
cmp eax, dword [ebp - 0x5c]
jne 0x5c7fe8
mov eax, dword [edi]
push esi
mov byte [ecx + eax], 0
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
jmp 0x5c80cb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.005c07e0
lea eax, [ebp - 0x28]
mov dword [ebp - 4], 2
push eax
lea eax, [ebp - 0x58]
push str.ReadFile_error:
push eax
call fcn.005a1e50
add esp, 0x14
mov ecx, 0x7450c8
push eax
call fcn.005a3660
lea ecx, [ebp - 0x58]
call fcn.00448860
lea ecx, [ebp - 0x28]
jmp 0x5c80bd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.005c07e0
add esp, 8
push 0x15
push str.GetFileSizeEx_error:
push 0
lea ecx, [ebp - 0x40]
mov dword [ebp - 4], 1
call fcn.005a5ba0
mov ecx, 0x7450c8
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x28], xmm0
movq xmm0, qword [eax + 0x10]
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
lea eax, [ebp - 0x28]
push eax
movq qword [ebp - 0x18], xmm0
call fcn.005a3660
mov edx, dword [ebp - 0x14]
cmp edx, 0x10
jb 0x5c80ba
mov ecx, dword [ebp - 0x28]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x5c80b0
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x5c80eb
push edx
push ecx
call fcn.0065cc27
add esp, 8
lea ecx, [ebp - 0x40]
call fcn.00448860
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0065cc3a
mov esp, ebp
pop ebp
ret
call fcn.0066375b
call fcn.0066375b
int3