Function at 0x4919f0
Capabilities:
Get file size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x34
mov eax, dword [0x550144]
xor eax, esp
mov dword [esp + 0x30], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0x14]
push esi
push edi
sub esp, 0xc
mov edi, ecx
push ebx
push dword [ebp + 0x10]
push 0xc0000000
push eax
call fcn.00471660
test eax, eax
js 0x491c62
mov esi, dword [ebp + 0xc]
mov eax, dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp esi, 0xffffffff
jne 0x491be8
cmp ebx, 4
jne 0x491bd7
lea ecx, [esp + 0x14]
mov dword [ebp + 0xc], 0
push ecx
push dword [edi]
call eax
mov dword [esp + 0x10], eax
cmp eax, 0xffffffff
jne 0x491a6d
call fcn.00471640
test eax, eax
js 0x491be0
mov eax, dword [esp + 0x10]
cmp dword [esp + 0x14], 0
ja 0x491a7d
cmp eax, 2
jb 0x491be0
mov esi, dword [edi]
lea eax, [esp + 0x1c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0
push eax
push dword [esp + 0x24]
mov dword [esp + 0x24], eax
push 2
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov ebx, eax
mov dword [esp + 0x24], ebx
test ebx, ebx
jne 0x491ab8
call fcn.00471640
mov dword [edi + 8], ebx
jmp 0x491c3c
mov esi, dword [esp + 0x18]
push 0
push esi
push 0
push 0
push 4
push ebx
mov dword [esp + 0x28], esi
call dword [sym.imp.KERNEL32.dll_MapViewOfFileEx]
mov dword [esp + 0x20], eax
test eax, eax
jne 0x491af0
call fcn.00471640
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi + 8], 0
jmp 0x491c3c
movzx ecx, word [eax]
mov edx, 0xfeff
cmp cx, dx
je 0x491bce
mov edx, 0xfffe
cmp cx, dx
je 0x491bce
lea ecx, [esp + 0x18]
mov dword [esp + 0x18], 0xffffffff
push ecx
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_IsTextUnicode]
test eax, eax
je 0x491bb4
cmp dword [esp + 0x18], 2
jne 0x491b6a
mov ebx, dword [esp + 0x20]
lea eax, [esp + 0x28]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetCPInfo]
cmp dword [esp + 0x28], 1
jbe 0x491b6a
xor esi, esi
cmp dword [esp + 0x10], esi
jle 0x491b6a
mov al, byte [ebx]
push eax
call dword [sym.imp.KERNEL32.dll_IsDBCSLeadByte]
lea ebx, [ebx + 1]
test eax, eax
jne 0x491b71
inc esi
cmp esi, dword [esp + 0x10]
jl 0x491b53
mov dword [ebp + 0xc], 1
mov eax, dword [esp + 0x20]
mov esi, dword [ebp + 0xc]
push eax
mov dword [esp + 0x1c], 0
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
test eax, eax
jne 0x491b94
call fcn.00471640
mov dword [esp + 0x18], eax
mov ebx, dword [esp + 0x24]
test ebx, ebx
je 0x491be3
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x491be3
cmp dword [esp + 0x18], eax
jl 0x491be3
call fcn.00471640
jmp 0x491be3
mov ecx, dword [esp + 0x20]
xor esi, esi
mov dword [esp + 0x18], 0
mov eax, ecx
mov dword [esp + 0x24], ebx
test ecx, ecx
je 0x491b98
jmp 0x491b78
mov dword [ebp + 0xc], 1
jmp 0x491b75
mov dword [edi + 8], 1
jmp 0x491bf0
mov esi, dword [ebp + 0xc]
mov eax, dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [edi + 8], esi
cmp esi, 1
jne 0x491c3c
lea ecx, [esp + 0x14]
push ecx
push dword [edi]
call eax
mov dword [esp + 0x10], eax
cmp eax, 0xffffffff
jne 0x491c0f
call fcn.00471640
test eax, eax
js 0x491c15
mov eax, dword [esp + 0x10]
or eax, dword [esp + 0x14]
jne 0x491c3c
push 0
lea eax, [esp + 0x1c]
mov dword [esp + 0x14], 0xfeff
push eax
push 2
lea eax, [esp + 0x1c]
push eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x491c3c
call fcn.00471640
push 2
lea eax, [esp + 0x18]
xorps xmm0, xmm0
push eax
push 0
push dword [edi]
movlpd qword [esp + 0x20], xmm0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x491c60
call fcn.00471640
xor eax, eax
mov ecx, dword [esp + 0x3c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004de0fd
mov esp, ebp
pop ebp
ret 0x14