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

Disassembly:
push 0xffffffffffffffff
push 0x5a3fc8
mov eax, dword fs:[0]
push eax
sub esp, 0x34
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5f13cc]
xor eax, esp
push eax
lea eax, [esp + 0x48]
mov dword fs:[0], eax
mov edi, ecx
mov esi, edx
cmp byte [esi + 0x35], 0
je 0x4d1737
push esi
call fcn.004d19f0
lea ecx, [esi + 0x1c]
mov dword [esp + 0x30], ecx
call fcn.004d2a90
lea ebp, [esi + 4]
mov ecx, ebp
call fcn.004688d0
push 0x5bcc3c
xor ebx, ebx
mov eax, esi
call fcn.00404050
xor edx, edx
cmp edi, edx
mov byte [esi + 0x34], dl
mov byte [esi + 0x35], dl
jne 0x4d176b
xor eax, eax
jmp 0x4d177f
mov eax, edi
lea ebx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, dx
jne 0x4d1770
sub eax, ebx
sar eax, 1
mov ebx, eax
push edi
mov eax, esi
call fcn.00404050
xor ebx, ebx
mov dword [esp + 0x1c], ebx
push ebx
push 0x80
push 3
push ebx
push 7
push closesocket
push edi
mov dword [esp + 0x6c], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x4d18cc
call fcn.004129d0
cmp eax, ebx
jl 0x4d1991
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x28]
push eax
push ecx
xor esi, esi
mov dword [esp + 0x30], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [esp + 0x24], eax
jne 0x4d17ec
call fcn.004129d0
cmp eax, ebx
jl 0x4d17f6
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
mov esi, eax
mov dword [esp + 0x28], edx
push esi
call fcn.0057740a
mov edi, eax
add esp, 4
mov dword [esp + 0x20], edi
cmp edi, ebx
mov byte [esp + 0x50], 1
push ebx
je 0x4d197a
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x28]
push eax
push esi
push edi
push ecx
mov dword [esp + 0x38], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, ebx
jne 0x4d1832
call fcn.004129d0
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x4d1845
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x1c], ebx
mov edx, dword [0x5fcd20]
mov eax, dword [edx + 0xc]
mov ecx, 0x5fcd20
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
cmp esi, ebx
mov byte [esp + 0x50], 2
mov dword [esp + 0x34], 0xffffffff
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebx
jbe 0x4d1896
mov dword [esp + 0x40], edi
mov dword [esp + 0x38], edi
lea edi, [esp + 0x34]
mov dword [esp + 0x44], esi
call fcn.004d0530
mov edi, dword [esp + 0x20]
lea ecx, [esp + 0x18]
push ecx
lea eax, [esp + 0x38]
call fcn.004d05c0
test eax, eax
je 0x4d1954
lea esp, [esp]
mov edx, dword [ebp + 4]
mov eax, dword [esp + 0x18]
push ebx
push edx
push eax
mov ecx, ebp
call fcn.00468970
mov ecx, dword [ebp + 4]
cmp ecx, ebx
je 0x4d18d5
mov dword [ecx], eax
jmp 0x4d18d8
mov dword [esp + 0x1c], eax
jmp 0x4d17c0
mov dword [ebp], eax
lea ebx, [esp + 0x18]
mov dword [ebp + 4], eax
mov dword [esp + 0x24], eax
call fcn.004192d0
mov edi, eax
call fcn.00419350
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx - 0xc]
cmp eax, 2
jle 0x4d1938
test eax, eax
jl 0x4d19a5
movzx edx, word [ecx]
cmp dx, 0x5b
jne 0x4d1938
test eax, eax
jle 0x4d1938
push 0x5d
push ecx
call fcn.00578331
add esp, 8
test eax, eax
je 0x4d1938
sub eax, dword [esp + 0x18]
sar eax, 1
cmp eax, 0xffffffff
je 0x4d1938
mov eax, dword [esp + 0x30]
lea ecx, [esp + 0x24]
push ecx
call fcn.004d2a40
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x38]
call fcn.004d05c0
xor ebx, ebx
test eax, eax
jne 0x4d18b0
mov edi, dword [esp + 0x20]
mov byte [esp + 0x50], 1
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4d1979
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push edi
call fcn.00578327
mov eax, dword [esp + 0x20]
add esp, 4
cmp eax, ebx
je 0x4d1991
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x48]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40
ret
push 0x80070057
call fcn.00404550
int3