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

Disassembly:
push 0x3d0
mov eax, 0x5151f8
call fcn.004604b6
mov eax, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 0x3d4], eax
mov esi, ebx
mov edi, ebx
call fcn.0048b0f8
push eax
lea ecx, [ebp - 0x94]
call fcn.004886bd
mov dword [ebp - 4], ebx
call fcn.0048b0fe
mov ecx, eax
call fcn.00488eb5
test al, al
je 0x4ad2a3
push dword [ebp - 0x3d4]
lea ecx, [ebp - 0x94]
call fcn.0048892f
push ebx
push 0x80
push 3
push ebx
push 1
push connect
lea ecx, [ebp - 0x94]
call fcn.004888ce
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x3d0], eax
cmp eax, 0xffffffff
jne 0x4ad24d
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x94]
call fcn.004887ca
jmp 0x4ad43c
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
test edi, edi
je 0x4ad239
push edi
mov dword [ebp - 0x3d8], ebx
call fcn.004510d6
pop ecx
push ebx
mov esi, eax
lea eax, [ebp - 0x3d8]
push eax
push edi
push esi
push dword [ebp - 0x3d0]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x3d0]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x3d8], edi
je 0x4ad429
push esi
call fcn.004510df
pop ecx
mov esi, ebx
jmp 0x4ad239
call fcn.0048b0fe
push eax
lea ecx, [ebp - 0x94]
call fcn.00488912
call fcn.0048b41d
test al, al
je 0x4ad2ca
call fcn.0048b104
mov dword [ebp - 0x3d0], eax
jmp 0x4ad338
call fcn.0048b10a
push eax
lea ecx, [ebp - 0x19c]
call fcn.004886bd
push ebx
lea ecx, [ebp - 0x19c]
mov byte [ebp - 4], 1
call fcn.004888ce
push eax
call fcn.004b85fe
pop ecx
pop ecx
push eax
lea ecx, [ebp - 0x94]
mov dword [ebp - 0x3d8], eax
call fcn.004888ce
push eax
call fcn.0049e550
mov dword [ebp - 0x3d0], eax
mov eax, dword [ebp - 0x3d8]
pop ecx
pop ecx
test eax, eax
je 0x4ad324
push eax
call fcn.004510df
pop ecx
lea ecx, [ebp - 0x19c]
mov byte [ebp - 4], bl
call fcn.004887ca
mov eax, dword [ebp - 0x3d0]
test eax, eax
je 0x4ad239
push 0xffffffffffffffff
push dword [ebp - 0x3d4]
lea ecx, [ebp - 0x118]
mov dword [ebp - 0x3dc], ebx
call fcn.004886e2
push 0x51f93c
push 0x53643c
lea ecx, [ebp - 0x118]
mov byte [ebp - 4], 2
call fcn.0048907f
lea eax, [ebp - 0x3cc]
push eax
lea eax, [ebp - 0x3dc]
push eax
push 1
lea ecx, [ebp - 0x118]
call fcn.004888ce
push eax
push dword [ebp - 0x3d0]
call fcn.0049df27
add esp, 0x14
test eax, eax
je 0x4ad3b3
lea ecx, [ebp - 0x118]
mov byte [ebp - 4], bl
call fcn.004887ca
jmp 0x4ad239
mov edi, dword [ebp - 0x1a0]
test edi, edi
je 0x4ad3a0
push edi
call fcn.004510d6
push edi
mov esi, eax
push esi
push dword [ebp - 0x3dc]
push dword [ebp - 0x3d0]
call fcn.0049e987
add esp, 0x14
test eax, eax
je 0x4ad406
cmp eax, 0x600
je 0x4ad406
push esi
call fcn.004510df
pop ecx
mov esi, ebx
call fcn.0048b41d
test al, al
jne 0x4ad3a0
push dword [ebp - 0x3d0]
call fcn.0049dd0f
pop ecx
jmp 0x4ad3a0
call fcn.0048b41d
test al, al
jne 0x4ad41b
push dword [ebp - 0x3d0]
call fcn.0049dd0f
pop ecx
lea ecx, [ebp - 0x118]
mov byte [ebp - 4], bl
call fcn.004887ca
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x94]
call fcn.004887ca
test esi, esi
jne 0x4ad4b7
push ebx
push 0x80
push 3
push ebx
push 1
push connect
push dword [ebp - 0x3d4]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x3d4], eax
cmp eax, 0xffffffff
je 0x4ad4b3
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
test edi, edi
je 0x4ad4b3
push edi
mov dword [ebp - 0x3d0], ebx
call fcn.004510d6
pop ecx
push ebx
mov esi, eax
lea eax, [ebp - 0x3d0]
push eax
push edi
push esi
push dword [ebp - 0x3d4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x3d4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x3d0], edi
je 0x4ad4b3
push esi
call fcn.004510df
pop ecx
mov esi, ebx
test esi, esi
je 0x4ad4c9
push edi
push esi
call fcn.004ad14a
push esi
mov ebx, eax
call fcn.004510df
add esp, 0xc
mov eax, ebx
call fcn.00460474
ret