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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x404030
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1dc
push ebx
push esi
mov eax, dword [ebp + 8]
push edi
xor esi, esi
mov dword [ebp - 0x10], esp
push esi
push 0x80
push 3
push esi
push 3
push closesocket
push eax
mov dword [ebp - 0x20], esi
mov dword [0x405bfc], esi
mov dword [0x405bf8], esi
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
lea ecx, [ebp - 0x14]
mov edi, eax
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
lea edx, [ebp - 0x14]
mov dword [ebp - 0x24], eax
push esi
push edx
lea eax, [ebp - 0xf0]
push 0x40
push eax
push edi
call ebx
mov ecx, dword [ebp - 0xb4]
push esi
push esi
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea edx, [ebp - 0x14]
push esi
push edx
lea eax, [ebp - 0x1e8]
push 0xf8
push eax
push edi
call ebx
mov dword [ebp - 0x1c], esi
mov ecx, dword [ebp - 0x1e2]
mov eax, dword [ebp - 0x1c]
and ecx, 0xffff
cmp eax, ecx
jge 0x401ebc
lea edx, [ebp - 0x14]
push 0
push edx
lea eax, [ebp - 0xa0]
push 0x28
push eax
push edi
call ebx
mov dword [ebp - 0x18], 0x4057d0
lea eax, [ebp - 0xa0]
mov cl, byte [eax]
mov edx, dword [ebp - 0x18]
mov byte [ebp + 0xb], cl
cmp cl, byte [edx]
jne 0x401eae
test cl, cl
je 0x401eaa
mov cl, byte [eax + 1]
mov byte [ebp + 0xb], cl
cmp cl, byte [edx + 1]
jne 0x401eae
add eax, 2
add edx, 2
test cl, cl
mov dword [ebp - 0x18], edx
jne 0x401e82
xor eax, eax
jmp 0x401eb3
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x401ebc
inc dword [ebp - 0x1c]
jmp 0x401e50
mov eax, dword [ebp - 0x8c]
push 0
push 0
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [ebp - 0x8c]
lea edx, [ebp - 0x14]
push 0
push edx
lea eax, [ebp - 0x44]
push 0x10
push eax
push edi
mov dword [ebp + 8], ecx
call ebx
mov eax, dword [ebp - 0x38]
mov edx, dword [ebp - 0x36]
mov ecx, eax
and edx, 0xffff
and ecx, 0xffff
add ecx, edx
cmp ecx, 0x64
jg 0x4021f2
mov ecx, dword [ebp - 0x36]
mov dword [ebp - 0x1c], 0
and eax, 0xffff
and ecx, 0xffff
add eax, ecx
mov ecx, dword [ebp - 0x1c]
cmp ecx, eax
jge 0x4021a0
lea eax, [ebp - 0x14]
push 0
push eax
lea ecx, [ebp - 0x30]
push 8
push ecx
push edi
call ebx
cmp dword [ebp - 0x30], 3
jne 0x4021bf
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp + 8]
and edx, 0x7fffffff
push 0
add edx, eax
push 0
push edx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 0x14]
push 0
push eax
lea ecx, [ebp - 0x58]
push 0x10
push ecx
push edi
call ebx
mov eax, dword [ebp - 0x4a]
and eax, 0xffff
lea edx, [eax + eax*2]
shl edx, 3
push edx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x18], 0
mov eax, dword [ebp - 0x4a]
mov ecx, dword [ebp - 0x18]
and eax, 0xffff
cmp ecx, eax
jge 0x4021bf
lea ecx, [ebp - 0x14]
push 0
push ecx
lea edx, [ebp - 0x70]
push 8
push edx
push edi
call ebx
mov eax, dword [ebp - 0x6c]
test eax, 0x80000000
jbe 0x4021b1
mov ecx, dword [ebp + 8]
and eax, 0x7fffffff
push 0
add eax, ecx
push 0
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 0x14]
push 0
push eax
lea ecx, [ebp - 0xb0]
push 0x10
push ecx
push edi
call ebx
lea edx, [ebp - 0x14]
push 0
push edx
lea eax, [ebp - 0x78]
push 8
push eax
push edi
call ebx
mov ecx, dword [ebp - 0x74]
mov edx, dword [ebp + 8]
push 0
add ecx, edx
push 0
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 0x14]
push 0
push eax
lea ecx, [ebp - 0x68]
push 0x10
push ecx
push edi
call ebx
mov eax, dword [ebp - 0x64]
test eax, eax
je 0x4021b1
mov edx, dword [ebp - 0x68]
mov ebx, dword [ebp - 0x94]
mov ecx, dword [ebp + 8]
sub edx, ebx
push 0
add edx, ecx
push 0
push edx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [ebp - 0x20]
lea eax, [esi + esi*2]
lea edx, [ebp - 0x14]
push 0
lea ebx, [ecx + eax*8]
push edx
push 0x18
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x64]
mov edx, dword [ebp + 8]
mov dword [ebx + 0x10], eax
mov ecx, dword [ebp - 0x68]
sub ecx, dword [ebp - 0x94]
lea eax, [ecx + edx]
mov ecx, dword [ebp - 0x24]
mov dword [ebx + 0x14], eax
mov edx, dword [ebx + 0x10]
add eax, edx
cmp eax, ecx
jbe 0x402081
mov eax, dword [ebp - 0x20]
push eax
jmp 0x4021ea
inc esi
mov ecx, dword [ebp - 0x4a]
and ecx, 0xffff
cmp esi, ecx
jae 0x402120
lea edx, [ebp - 0x14]
push 0
push edx
lea eax, [ebp - 0x28]
push 4
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 0x28], 0x28
jne 0x4020f8
push 1
push 0
push 0xfffffffffffffffc
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [ebp - 0x20]
lea ecx, [esi + esi*2]
lea eax, [ebp - 0x14]
push 0
lea ebx, [edx + ecx*8]
push eax
push 0x18
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 1
push 0
push 0xffffffffffffffe8
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebx + 0x14], eax
mov ecx, dword [ebx - 4]
push 1
push 0
sub eax, ecx
push 4
push edi
mov dword [ebx - 8], eax
inc esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 1
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, dword [ebp - 0x8c]
mov edx, dword [ebp - 0x90]
lea ecx, [edx + ecx - 0x3e8]
cmp eax, ecx
jbe 0x402082
cmp word [ebp - 0x4a], 1
je 0x402135
mov eax, dword [ebp - 0x20]
lea edx, [esi + esi*2]
mov dword [eax + edx*8 - 8], 0x2710
mov ecx, 0x20
mov edx, 0x20
cmp edx, 0x60
jg 0x402172
xor esi, esi
mov eax, dword [ebp - 0x4a]
and eax, 0xffff
cmp esi, eax
jae 0x40216d
mov ebx, dword [ebp - 0x20]
lea eax, [esi + esi*2]
lea eax, [ebx + eax*8]
xor ebx, ebx
mov bx, word [eax + 0xe]
cmp ecx, ebx
jne 0x40216a
cmp dword [eax + 4], edx
je 0x4021a0
inc esi
jmp 0x402146
add edx, 0x10
jmp case.0x402182.8
lea esi, [ecx - 4]
cmp esi, 0x1c
ja case.0x402182.8
xor eax, eax
mov al, byte [esi + 0x402218]
jmp dword [eax*4 + 0x402204]
mov ecx, 8
jmp 0x40213a
mov ecx, 0x18
jmp 0x40213a
mov ecx, 4
jmp 0x40213a
xor esi, esi
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x20]
test ecx, ecx
jne 0x4021d1
push ecx
jmp 0x4021ea
inc dword [ebp - 0x18]
jmp 0x401f8a
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x36]
inc eax
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x38]
jmp 0x401f0f
lea edx, [esi + esi*2]
push ecx
lea eax, [ecx + edx*8]
mov edx, dword [ecx + edx*8 + 0x10]
mov dword [0x405bfc], edx
mov eax, dword [eax + 0x14]
mov dword [0x405bf8], eax
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret