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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x189c
call fcn.004ce9d0
mov eax, dword [0x5cd9a0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
xor edx, edx
push ebx
push esi
mov dword [ebp - 0x1888], eax
mov esi, ecx
mov eax, dword [ebp + 0xc]
mov ecx, 0xbfd80
mov dword [ebp - 0x1894], eax
push edi
mov eax, dword [esi + 0x24]
add eax, 0xffffffe7
div ecx
shl eax, 7
mov ebx, edx
mov dword [ebp - 0x1890], eax
mov edi, eax
mov dword [ebp - 0x1884], edi
cmp ebx, 0x80
jbe 0x479133
lea ecx, [ebx - 0x80]
mov eax, 0xaad56003
mul ecx
mov eax, dword [ebp - 0x1890]
shr edx, 0xc
add edi, edx
mov dword [ebp - 0x1884], edi
mov edi, dword [esi + 0x18]
cmp edi, dword [ebp - 0x1884]
jb 0x479160
mov edi, eax
cmp ebx, 0x80
jbe 0x479160
lea ecx, [ebx - 0x80]
mov eax, 0xaad56003
mul ecx
shr edx, 0xc
add edi, edx
nop word [eax + eax]
mov eax, dword [ebp - 0x1894]
xor edx, edx
mov ecx, 0xbfd80
mov dword [ebp - 0x1890], 0
mov dword [eax], 0xffffffff
mov eax, dword [esi + 0x24]
add eax, 0xffffffe7
div ecx
mov ebx, eax
shl ebx, 7
cmp edx, 0x80
jbe 0x4791a1
lea ecx, [edx - 0x80]
mov eax, 0xaad56003
mul ecx
shr edx, 0xc
add ebx, edx
cmp edi, ebx
jae 0x479258
mov ebx, edi
shr ebx, 7
cmp dword [esi + 0x44], ebx
je 0x479205
imul eax, ebx, 0xbfd80
push 0
push 0
add eax, 0x19
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x47924c
push 0
lea eax, [ebp - 0x1884]
mov dword [ebp - 0x1884], 0
push eax
push 0x80
lea eax, [esi + 0x48]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x479240
cmp dword [ebp - 0x1884], 0x80
jne 0x479240
mov dword [esi + 0x44], ebx
mov edx, edi
imul eax, ebx, 0xbfd80
and edx, 0x7f
imul ecx, edx, 0x17fa
add ecx, 0x99
add eax, ecx
mov ecx, dword [ebp - 0x1894]
mov dword [ecx], eax
mov ecx, dword [ebp - 0x1888]
mov al, byte [edx + esi + 0x48]
mov dword [ecx], edi
test al, al
je 0x4793f7
inc edi
jmp 0x479160
mov dword [esi + 0x28], 5
jmp 0x479416
mov dword [esi + 0x28], 0xa
jmp 0x479416
mov eax, dword [ebp - 0x1888]
push 0x187a
push 0
mov dword [eax], edi
lea eax, [ebp - 0x1880]
push eax
call fcn.004cf68b
mov eax, dword [esi + 0x24]
xor edx, edx
add eax, 0xffffffe7
mov ecx, 0xbfd80
div ecx
add esp, 0xc
mov ecx, esi
mov dword [ebp - 0x1888], edx
mov ebx, eax
call fcn.00479a90
test eax, eax
je 0x479416
mov eax, dword [ebp - 0x1888]
imul edx, ebx, 0xbfd80
mov dword [ebp - 0x1898], edx
cmp eax, 0x80
jae 0x47930e
push 0
push 0
lea eax, [edx + 0x19]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x47924c
push 0
lea eax, [ebp - 0x1888]
mov dword [ebp - 0x1888], 0
push eax
push 0x80
lea eax, [ebp - 0x1880]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x47940f
cmp dword [ebp - 0x1888], 0x80
jne 0x47940f
mov eax, 0x80
lea ecx, [eax - 0x80]
mov eax, 0xaad56003
mul ecx
mov ecx, dword [ebp - 0x1898]
mov eax, edx
add ecx, 0x99
shr eax, 0xc
mov dword [ebp - 0x189c], eax
imul eax, eax, 0x17fa
push 0
push 0
add eax, ecx
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x47924c
push 0
lea eax, [ebp - 0x1884]
mov dword [ebp - 0x1884], 0
push eax
push 0x17fa
lea eax, [ebp - 0x1880]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x47940f
cmp dword [ebp - 0x1884], 0x17fa
jne 0x47940f
push 0
push dword [esi]
mov dword [esi + 0x44], 0xffffffff
call dword [sym.imp.KERNEL32.dll_GetFileSize]
shl ebx, 7
mov ecx, esi
add ebx, dword [ebp - 0x189c]
push 0
push ebx
mov dword [esi + 0x24], eax
call fcn.0047a4b0
test eax, eax
je 0x479416
mov eax, dword [ebp - 0x1894]
lea ecx, [ebp - 0x1890]
push ecx
push eax
mov ecx, esi
mov byte [ebp - 0x1889], 0
mov dword [eax], 0xffffffff
lea eax, [ebp - 0x1889]
push eax
push edi
call fcn.00478f80
test eax, eax
je 0x479416
cmp dword [ebp - 0x1890], 0
je 0x4793f7
mov dword [esi + 0x28], 3
jmp 0x479416
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004ce1ec
mov esp, ebp
pop ebp
ret 8
mov dword [esi + 0x28], 4
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004ce1ec
mov esp, ebp
pop ebp
ret 8