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

Disassembly:
sub esp, 0x120
push ebx
push ebp
push esi
push edi
mov edi, 0x6955f8
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x2c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov byte [esp + 0x2c], 0
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
mov ebp, dword [esp + 0x134]
and ecx, 3
lea edx, [esp + 0x2c]
rep movsb byte es:[edi], byte [esi]
mov edi, ebp
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push eax
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push 0x80
push 3
mov ecx, ebx
push eax
push eax
and ecx, 3
lea eax, [esp + 0x40]
push closesocket
rep movsb byte es:[edi], byte [esi]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x40c896
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push ebp
lea ebx, [eax - 2]
push 0x3aa
push str.C:SOURCEBASEDEMOMyDDrawSourceGameTool.cpp
push ebx
call fcn.00415350
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x40c7ac
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x120
ret
mov edx, dword [esp + 0x138]
mov ebp, dword [sym.imp.KERNEL32.dll_ReadFile]
lea ecx, [esp + 0x24]
push 0
push ecx
push 2
push edx
push esi
call ebp
lea eax, [esp + 0x24]
push 0
push eax
push ebx
push edi
push esi
call ebp
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebp, dword [esp + 0x138]
mov ebx, dword [esp + 0x134]
xor ecx, ecx
push ebx
mov cx, word [ebp]
push 0x3af
shl ecx, 2
push str.C:SOURCEBASEDEMOMyDDrawSourceGameTool.cpp
push ecx
call fcn.00415350
add esp, 0x10
mov dword [esp + 0x20], eax
test eax, eax
jne 0x40c814
push ebx
push 0x3b0
jmp 0x40c888
xor eax, eax
xor edx, edx
mov ax, word [ebp]
xor ecx, ecx
test eax, eax
jbe 0x40c85d
mov dword [esp + 0x10], eax
mov ax, word [ecx + edi]
add ecx, 2
add edx, 2
and eax, 0xffff
jbe 0x40c852
mov ebx, eax
xor eax, eax
dec ebx
mov ax, word [edi + ecx + 4]
lea edx, [edx + eax*2 + 6]
lea ecx, [ecx + eax + 6]
jne 0x40c839
mov ebx, dword [esp + 0x134]
mov eax, dword [esp + 0x10]
dec eax
mov dword [esp + 0x10], eax
jne 0x40c826
push ebx
push 0x3bd
push str.C:SOURCEBASEDEMOMyDDrawSourceGameTool.cpp
push edx
call fcn.00415350
xor edx, edx
add esp, 0x10
cmp eax, edx
mov dword [esp + 0x28], eax
jne 0x40c8a3
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
push 0x3be
push str.C:SOURCEBASEDEMOMyDDrawSourceGameTool.cpp
push edi
call fcn.00415390
add esp, 0x10
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x120
ret
xor esi, esi
cmp word [ebp], dx
mov dword [esp + 0x10], edx
jbe 0x40c9a8
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x14], ecx
mov ebx, dword [esp + 0x14]
lea ecx, [eax + esi]
add edx, 2
add esi, 2
mov dword [ebx], ecx
mov bx, word [edx + edi - 2]
mov word [ecx], bx
and ebx, 0xffff
jbe 0x40c97f
mov dword [esp + 0x18], ebx
mov bp, word [edx + edi]
mov bx, word [edi + edx + 2]
mov cx, word [edi + edx + 4]
mov word [eax + esi], bp
mov word [eax + esi + 2], bx
mov word [eax + esi + 4], cx
add edx, 6
add esi, 6
and ecx, 0xffff
jbe 0x40c969
mov dword [esp + 0x1c], ecx
movzx cx, byte [edx + edi]
mov eax, dword [0x6955f4]
mov ebp, dword [0x425690]
lea ecx, [ecx + ecx*2]
xor ebx, ebx
and ecx, 0xffff
add esi, 2
add ecx, eax
xor eax, eax
mov al, byte [ecx + 2]
mov bl, byte [ecx + 1]
mov bp, word [ebp + eax*4]
mov eax, dword [0x42568c]
or bp, word [eax + ebx*4]
xor eax, eax
mov al, byte [ecx]
mov ecx, dword [0x425688]
or bp, word [ecx + eax*4]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x1c]
inc edx
mov word [eax + esi - 2], bp
dec ecx
mov dword [esp + 0x1c], ecx
jne 0x40c910
mov ecx, dword [esp + 0x18]
dec ecx
mov dword [esp + 0x18], ecx
jne 0x40c8e2
mov ebp, dword [esp + 0x138]
mov ecx, dword [esp + 0x14]
mov ebx, dword [esp + 0x10]
add ecx, 4
inc ebx
mov dword [esp + 0x14], ecx
xor ecx, ecx
mov cx, word [ebp]
mov dword [esp + 0x10], ebx
cmp ebx, ecx
jb 0x40c8bb
mov ebx, dword [esp + 0x134]
push ebx
push 0x3da
push str.C:SOURCEBASEDEMOMyDDrawSourceGameTool.cpp
push edi
call fcn.00415390
mov eax, dword [esp + 0x30]
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x120
ret