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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x494010
mov eax, dword fs:[0]
push eax
sub esp, 0x124
mov eax, dword [0x4ae480]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
lea eax, [ebp - 0x11c]
mov dword [ebp - 0x12c], 5
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x120], eax
cmp eax, 0x100000
jae 0x419b33
cmp dword [ebp - 0x11c], 0
jne 0x419b33
inc eax
push eax
call fcn.0047c4da
add esp, 4
mov ebx, eax
lea eax, [ebp - 0x124]
mov dword [ebp - 0x128], ebx
push 0
push eax
push dword [ebp - 0x120]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x120]
cmp dword [ebp - 0x124], eax
jne 0x419b2a
cmp eax, 2
jbe 0x4199a1
cmp byte [ebx], 0xfe
jne 0x41994e
cmp byte [ebx + 1], 0xff
jne 0x41994e
test al, 1
jne 0x419b2a
xor edx, edx
test eax, eax
je 0x41994e
mov al, byte [ebx + edx + 1]
mov cl, byte [ebx + edx]
mov byte [ebx + edx], al
mov byte [ebx + edx + 1], cl
add edx, 2
mov eax, dword [ebp - 0x120]
cmp edx, eax
jb 0x419933
cmp eax, 2
jbe 0x4199a1
cmp byte [ebx], 0xff
jne 0x4199a1
cmp byte [ebx + 1], 0xfe
jne 0x4199a1
shr eax, 1
lea esi, [ebx + 2]
push eax
lea edi, [eax - 1]
call fcn.0047c4da
add esp, 4
mov ebx, eax
push 0
push 0
push edi
push ebx
push edi
push esi
push 0x200
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push 1
push dword [ebp - 0x128]
mov byte [ebx + edi], 0
call fcn.0047c4cc
add esp, 8
mov eax, ebx
jmp 0x419b35
cmp eax, 3
jbe 0x419ac6
cmp byte [ebx], 0xef
jne 0x419ac6
cmp byte [ebx + 1], 0xbb
jne 0x419ac6
cmp byte [ebx + 2], 0xbf
jne 0x419ac6
lea edi, [ebx + 3]
mov dword [ebp - 0x118], 0
xor esi, esi
mov dword [ebp - 0x114], esi
test edi, edi
je 0x419a69
lea eax, [ebp - 0x110]
mov dword [ebp - 0x118], eax
xor eax, eax
push eax
push eax
push 0xffffffffffffffff
push edi
push eax
push 0xfde9
mov word [ebp - 0x110], ax
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov esi, eax
mov dword [ebp - 0x114], esi
test esi, esi
je 0x419a69
lea eax, [esi + 1]
cmp eax, 0x80
jbe 0x419a48
mov ecx, 2
mul ecx
mov ecx, 0xffffffff
cmovb eax, ecx
push eax
call fcn.0047c4da
mov esi, dword [ebp - 0x114]
mov ecx, eax
add esp, 4
mov dword [ebp - 0x118], ecx
jmp 0x419a4e
mov ecx, dword [ebp - 0x118]
lea eax, [esi + 1]
push eax
push ecx
push 0xffffffffffffffff
push edi
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov esi, dword [ebp - 0x114]
lea eax, [esi + 1]
mov dword [ebp - 4], 0
push eax
call fcn.0047c4da
add esp, 4
mov edi, eax
push 0
push 0
push esi
push edi
push esi
push dword [ebp - 0x118]
push 0x200
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push ebx
mov byte [edi + esi], 0
call fcn.004568b0
mov eax, dword [ebp - 0x118]
add esp, 4
test eax, eax
je 0x419ac2
lea ecx, [ebp - 0x110]
cmp eax, ecx
je 0x419ac2
push eax
call fcn.004568b0
add esp, 4
mov eax, edi
jmp 0x419b35
cmp eax, 4
jbe 0x419b22
lea ecx, [ebp - 0x12c]
push ecx
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_IsTextUnicode]
test eax, eax
je 0x419b1c
mov edi, dword [ebp - 0x120]
shr edi, 1
lea eax, [edi + 1]
push eax
call fcn.0047c4da
add esp, 4
mov esi, eax
push 0
push 0
push edi
push esi
push edi
push ebx
push 0x200
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push 1
push ebx
mov byte [esi + edi], 0
call fcn.0047c4cc
add esp, 8
mov eax, esi
jmp 0x419b35
mov eax, dword [ebp - 0x120]
mov byte [ebx + eax], 0
mov eax, ebx
jmp 0x419b35
push ebx
call fcn.004568b0
add esp, 4
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0047c26b
mov esp, ebp
pop ebp
ret