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

Disassembly:
push 0x550
mov eax, 0x5525cf
call fcn.00513ea1
mov dword [ebp - 0x55c], ecx
mov edi, dword [ebp + 8]
mov dword [ebp - 0x540], edi
call fcn.00482ca4
push eax
lea ecx, [ebp - 0x308]
call fcn.004806c7
and dword [ebp - 4], 0
call fcn.00482caa
mov ecx, eax
call fcn.00480e97
test al, al
je 0x4c0241
push edi
lea ecx, [ebp - 0x308]
call fcn.00480907
push 0
push 0x80
push 3
push 0
push 1
push connect
lea ecx, [ebp - 0x308]
call fcn.004d71d0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4c01e9
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x308]
call fcn.00480803
jmp 0x4c0338
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
mov dword [ebp - 0x53c], eax
test esi, esi
je 0x4c01d5
call fcn.00402160
and dword [ebp - 0x550], 0
push esi
call fcn.004741dd
pop ecx
push 0
mov ebx, eax
lea eax, [ebp - 0x550]
push eax
push esi
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x550], esi
je 0x4c0321
push ebx
call fcn.004741e6
pop ecx
jmp 0x4c01d5
call fcn.0047ad8f
call fcn.00482caa
push eax
lea ecx, [ebp - 0x308]
call fcn.004808ea
call fcn.00482feb
test al, al
je 0x4c0267
call fcn.00482cb0
jmp 0x4c027f
push 2
push 0
lea ecx, [ebp - 0x308]
call fcn.004d71d0
push eax
call fcn.004a76e1
add esp, 0xc
mov edi, eax
test edi, edi
je 0x4c01d5
lea eax, [ebp - 0x538]
push eax
lea eax, [ebp - 0x558]
push eax
push 1
push dword [ebp - 0x540]
push edi
call fcn.004a7122
add esp, 0x14
test eax, eax
jne 0x4c01d5
mov esi, dword [ebp - 0x30c]
mov dword [ebp - 0x53c], esi
test esi, esi
je 0x4c01d5
push esi
call fcn.004741dd
push 3
push esi
mov ebx, eax
push ebx
push dword [ebp - 0x558]
push edi
call fcn.004a7aa1
add esp, 0x18
mov esi, eax
call fcn.0047ac17
test esi, esi
je 0x4c0311
cmp esi, 0x600
je 0x4c0311
push ebx
call fcn.004741e6
pop ecx
call fcn.00482feb
test al, al
jne 0x4c01d5
push edi
call fcn.004a6f7c
jmp 0x4c023e
call fcn.00482feb
test al, al
jne 0x4c0321
push edi
call fcn.004a6f7c
pop ecx
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x308]
call fcn.00480803
test ebx, ebx
jne 0x4c044a
call fcn.00402160
push 0
push 0x80
push 3
push 0
xor edi, edi
inc edi
push edi
push connect
push dword [ebp - 0x540]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x540], eax
cmp eax, 0xffffffff
je 0x4c0443
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
mov dword [ebp - 0x53c], ebx
test ebx, ebx
je 0x4c0443
and dword [ebp - 0x554], 0
and dword [ebp - 0x54c], 0
and dword [ebp - 0x548], 0
and dword [ebp - 0x544], 0
mov dword [ebp - 4], edi
lea eax, [ebp - 0x12c]
push 0x46
pop ecx
mov esi, str.AscUpYMjq2F7dOEsLkq8ET2OgAwAZ2tzSyoFreGrYFkB4pgMQqoUO0EL4ip9gNO6LL8fGG9Hqxs3IcraB25mgLofdBxq5jfMNPBoTYLIb59gAYjEmt4lKctzS14eaI5gE9WT5GnvEM04TbxaMNnZyJYbQo9yg9DFgieWBOrmiVRoG7e9gysDkhq49znuS4l57Gf9rKZD4uG2DYPpyCPDJiFfquci5Pz035AuW73qC4WyNEfA4ewChbikso9PeBLwo2S8LztpvmChBqM97YYCOxuvh
lea edi, [ebp - 0x12c]
rep movsd dword es:[edi], dword [esi]
push eax
lea ecx, [ebp - 0x284]
movsw word es:[edi], word [esi]
call fcn.004057d0
lea eax, [ebp - 0x284]
mov byte [ebp - 4], 2
push eax
lea ecx, [ebp - 0x54c]
call fcn.00408170
push 0
push 1
lea ecx, [ebp - 0x284]
mov byte [ebp - 4], 1
call fcn.004096c0
push ebx
call fcn.004741dd
mov esi, dword [ebp - 0x53c]
mov ebx, eax
mov edi, dword [ebp - 0x540]
lea eax, [ebp - 0x554]
pop ecx
push 0
push eax
push esi
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x554], esi
je 0x4c0430
push ebx
call fcn.004741e6
pop ecx
xor ebx, ebx
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x54c]
call fcn.0047920e
test ebx, ebx
jne 0x4c044a
xor eax, eax
jmp 0x4c04de
xor eax, eax
mov dword [ebp - 0x54c], eax
mov dword [ebp - 0x548], eax
mov dword [ebp - 0x544], eax
push 0x4f
pop ecx
mov esi, str.S44nn5KGV8B6OezyNSyGmJanW0N8GjAwI74ltXL7chBQLX0vdqAZsGkQdJ8UErzs8o6GPhz0AcrjPpAIw4NTDI1VSG3wYCw3tJi9dCap9t3tOJGJ4zI2ZtTbPuA3MQKaiUoTBe310ij4ieWOZ9qRHSsd2UDUoka4Fj7Zg6ftyzI67WWILixgFuS3OGPVkTJiQHdFG6N5HcunlzSICtNrtmsODVz4KgVCojWK79hoFwFq0dLTjjufD5EFhokGRbgeX9wLbi5yqXVFxIbXeh6BVPzA734JxfEzjoFMJgPJCu6G3gorPzKoGyeqy7tvLV
mov dword [ebp - 4], 3
lea edi, [ebp - 0x26c]
rep movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x26c]
push eax
lea ecx, [ebp - 0x284]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
call fcn.004057d0
lea eax, [ebp - 0x284]
mov byte [ebp - 4], 4
push eax
lea ecx, [ebp - 0x54c]
call fcn.00408170
push 0
push 1
lea ecx, [ebp - 0x284]
mov byte [ebp - 4], 3
call fcn.004096c0
push dword [ebp - 0x53c]
mov ecx, dword [ebp - 0x55c]
push ebx
call fcn.004c04e6
push 1
push ebx
mov esi, eax
call fcn.00474185
pop ecx
pop ecx
lea ecx, [ebp - 0x54c]
call fcn.0047920e
mov eax, esi
call fcn.00513e4b
ret 4