Function at 0x47ad7a
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x49994d
mov eax, dword fs:[0]
push eax
mov eax, 0x1030
call fcn.00496530
push ebx
push esi
push edi
mov eax, dword [0x4c8e6c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x18], ecx
mov eax, dword [0x4c8014]
xor esi, esi
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x10], eax
or dword [ebp - 0x14], 0xffffffff
or dword [ebp - 0x20], 0xffffffff
mov dword [ebp - 4], esi
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x30]
push eax
push dword [ecx + 0x42c]
add ecx, 8
mov byte [ebp - 4], 1
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x2c], esi
call fcn.0046301e
mov ecx, eax
call fcn.00464951
mov edi, dword [ebp + 8]
mov byte [ebp - 4], 2
cmp dword [edi + 0xc], esi
je 0x47b052
push dword [edi + 4]
lea eax, [ebp - 0x10]
push str.Copying_file__s.
push eax
call fcn.00460165
add esp, 0xc
push esi
push esi
push ecx
lea eax, [ebp - 0x10]
mov ecx, esp
mov dword [ebp + 8], esp
push eax
call fcn.0045e829
mov ecx, dword [ebp - 0x18]
add ecx, 0x438
mov dword [ebp + 8], ecx
call fcn.00461a7e
mov eax, dword [edi + 4]
push esi
push esi
push 3
push esi
push 3
push connect
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x14], eax
cmp eax, 0xffffffff
jne 0x47aea6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x18]
push eax
call fcn.004609a6
pop ecx
pop ecx
push eax
lea ecx, [edi + 0x14]
mov byte [ebp - 4], 3
call fcn.0045f9b8
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 2
call fcn.0045ddba
push dword [edi + 4]
lea eax, [ebp - 0x10]
push str.Error_opening_file__s.
push eax
call fcn.00460165
add esp, 0xc
push esi
push esi
push ecx
lea eax, [ebp - 0x10]
mov ecx, esp
mov dword [ebp - 0x18], esp
push eax
call fcn.0045e829
mov ecx, dword [ebp + 8]
call fcn.00461a7e
lea eax, [ebp - 0x3c]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
cmp eax, esi
jne 0x47af17
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x18]
push eax
call fcn.004609a6
pop ecx
pop ecx
push eax
lea ecx, [edi + 0x14]
mov byte [ebp - 4], 4
call fcn.0045f9b8
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 2
call fcn.0045ddba
push dword [edi + 4]
push str.Couldnt_get_file_size_of__s
lea eax, [ebp - 0x10]
push eax
call fcn.00460165
add esp, 0xc
push esi
push esi
push ecx
lea eax, [ebp - 0x10]
mov ecx, esp
mov dword [ebp - 0x18], esp
push eax
call fcn.0045e829
mov ecx, dword [ebp + 8]
call fcn.00461a7e
push dword [ebp - 0x14]
jmp 0x47b071
push 0x49da74
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.00460179
push edi
push eax
lea eax, [ebp - 0x18]
push eax
mov byte [ebp - 4], 5
call fcn.004647c9
push eax
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 6
call fcn.0045f9b8
lea ecx, [ebp - 0x18]
call fcn.0045ddba
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 2
call fcn.0045ddba
push esi
push esi
push 2
push esi
push 1
push 0x40000000
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x20], eax
cmp eax, 0xffffffff
jne 0x47afae
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x18]
push eax
call fcn.004609a6
pop ecx
pop ecx
push eax
lea ecx, [edi + 0x14]
mov byte [ebp - 4], 7
call fcn.0045f9b8
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 2
call fcn.0045ddba
push dword [ebp - 0x24]
push str.Error_creating_file__s.
jmp 0x47aeea
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x18], esi
jmp 0x47b020
push esi
lea eax, [ebp - 0x28]
push eax
push 0x400
lea eax, [ebp - 0x103c]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x47b02e
cmp dword [ebp - 0x28], esi
je 0x47b02e
push esi
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x28]
lea eax, [ebp - 0x103c]
push eax
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x47b02e
mov eax, dword [ebp - 0x2c]
cmp dword [ebp - 0x28], eax
jne 0x47b02e
add dword [ebp - 0x1c], eax
push esi
adc dword [ebp - 0x18], esi
fild qword [ebp - 0x1c]
fmul qword [0x49f1b0]
fild qword [ebp - 0x3c]
fdivp st(1)
call fcn.00496570
mov ecx, dword [ebp + 8]
push eax
call fcn.0046153c
mov ecx, dword [ebp + 8]
call fcn.00461490
test al, al
je 0x47afb6
jmp 0x47b059
push dword [ebp - 0x14]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x20]
or dword [ebp - 0x14], 0xffffffff
call esi
or dword [ebp - 0x20], 0xffffffff
lea eax, [ebp - 0x24]
push eax
lea ecx, [edi + 4]
call fcn.0045f9b8
mov dword [ebp - 0x34], 1
cmp dword [ebp - 0x14], 0xffffffff
je 0x47b068
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x20], 0xffffffff
je 0x47b077
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x30]
call fcn.0045ddba
lea ecx, [ebp - 0x24]
call fcn.0045ddba
lea ecx, [ebp - 0x10]
call fcn.0045ddba
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
leave
ret 4