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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
xor edi, edi
push edi
push 0x80
push 3
push edi
push 1
push SysReAllocStringLen
push dword [ebp + 8]
mov dword [eax], edi
xor ebx, ebx
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x14], edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x10], eax
jne 0x1082a4c
call esi
test eax, eax
jg 0x1082a5e
call esi
mov ebx, eax
jmp 0x1082a6e
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [ebp - 0xc], eax
jne 0x1082a77
jmp 0x1082a40
call esi
mov ebx, eax
and ebx, 0xffff
or ebx, 0x80070000
cmp ebx, edi
jl 0x1082a77
mov ebx, 0x80004005
cmp ebx, edi
mov byte [ebp + 0xb], 1
jl 0x1082dd0
push 2
pop edi
cmp dword [ebp - 0xc], edi
jbe 0x1082c0b
push 0
lea eax, [ebp - 0x14]
push eax
push edi
lea eax, [ebp - 6]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1082ad2
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jg 0x1082ab9
call esi
mov ebx, eax
jmp 0x1082ac9
call esi
mov ebx, eax
and ebx, 0xffff
or ebx, 0x80070000
test ebx, ebx
jl 0x1082ad2
mov ebx, 0x80004005
cmp dword [ebp - 0x14], edi
je 0x1082adc
mov ebx, 0x80004005
test ebx, ebx
jl 0x1082dd0
cmp word [ebp - 6], 0xfeff
jne 0x1082af8
sub dword [ebp - 0xc], edi
mov byte [ebp + 0xb], 0
jmp 0x1082c0b
cmp dword [ebp - 0xc], 3
jbe 0x1082bc9
mov ecx, edi
mov edi, 0x101e1f4
lea esi, [ebp - 6]
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x1082b17
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x1082bc9
xor edi, edi
push edi
lea eax, [ebp - 0x14]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
jne 0x1082b64
call esi
test eax, eax
jg 0x1082b4b
call esi
mov ebx, eax
jmp 0x1082b5b
call esi
mov ebx, eax
and ebx, 0xffff
or ebx, 0x80070000
cmp ebx, edi
jl 0x1082b64
mov ebx, 0x80004005
cmp dword [ebp - 0x14], 1
je 0x1082b6f
mov ebx, 0x80004005
cmp ebx, edi
jl 0x1082dd0
cmp byte [ebp - 1], 0xbf
jne 0x1082b8d
sub dword [ebp - 0xc], 3
mov dword [ebp + 0x14], 0xfde9
jmp 0x1082c11
push edi
push edi
push edi
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x1082c0b
call esi
test eax, eax
jg 0x1082baa
call esi
mov ebx, eax
jmp 0x1082bba
call esi
mov ebx, eax
and ebx, 0xffff
or ebx, 0x80070000
cmp ebx, edi
jl 0x1082dd0
mov ebx, 0x80004005
jmp 0x1082c11
xor eax, eax
push eax
push eax
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x1082c0b
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jg 0x1082bee
call esi
mov ebx, eax
jmp 0x1082bfe
call esi
mov ebx, eax
and ebx, 0xffff
or ebx, 0x80070000
test ebx, ebx
jl 0x1082dd0
mov ebx, 0x80004005
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
test ebx, ebx
jl 0x1082dd0
cmp byte [ebp + 0xb], 0
je 0x1082d50
mov edi, dword [ebp - 0xc]
lea eax, [edi + 1]
push eax
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
test eax, eax
pop ecx
mov dword [ebp - 8], eax
jne 0x1082c3c
mov ebx, 0x8007000e
test ebx, ebx
jl 0x1082dd0
push 0
lea ecx, [ebp - 0xc]
push ecx
push edi
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1082c82
call esi
test eax, eax
jg 0x1082c65
call esi
mov ebx, eax
jmp 0x1082c75
call esi
mov ebx, eax
and ebx, 0xffff
or ebx, 0x80070000
test ebx, ebx
jl 0x1082d42
mov ebx, 0x80004005
test ebx, ebx
jl 0x1082d42
mov edi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
xor eax, eax
push eax
push eax
push dword [ebp - 0xc]
push dword [ebp - 8]
push eax
push dword [ebp + 0x14]
call edi
test eax, eax
mov dword [ebp + 8], eax
jl 0x1082cbc
cmp eax, 0x7fffffff
jge 0x1082cbc
inc eax
push eax
call fcn.010420ba
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
jmp 0x1082cc2
mov eax, dword [ebp + 0xc]
and dword [eax], 0
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
test eax, eax
jne 0x1082cd0
mov ebx, 0x8007000e
test ebx, ebx
jl 0x1082d42
and dword [ebp - 0x18], 0
cmp dword [ebp - 0xc], 0
jbe 0x1082d1b
push dword [ebp + 8]
push eax
push dword [ebp - 0xc]
push dword [ebp - 8]
push 0
push dword [ebp + 0x14]
call edi
test eax, eax
mov dword [ebp - 0x18], eax
jne 0x1082d1b
call esi
test eax, eax
jg 0x1082d02
call esi
mov ebx, eax
jmp 0x1082d12
call esi
mov ebx, eax
and ebx, 0xffff
or ebx, 0x80070000
test ebx, ebx
jl 0x1082d3a
mov ebx, 0x80004005
test ebx, ebx
jl 0x1082d3a
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov ecx, dword [ebp + 8]
and word [eax + ecx*2], 0
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x1082d42
mov ecx, dword [ebp - 0x18]
mov dword [eax], ecx
jmp 0x1082d42
push dword [ebp + 0xc]
call fcn.01042113
push dword [ebp - 8]
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
pop ecx
jmp 0x1082dd0
mov eax, dword [ebp - 0xc]
shr eax, 1
inc eax
push eax
call fcn.010420ba
test eax, eax
mov edi, dword [ebp + 0xc]
mov dword [edi], eax
jne 0x1082d6a
mov ebx, 0x8007000e
test ebx, ebx
jl 0x1082dd0
push 0
lea ecx, [ebp + 0xc]
push ecx
push dword [ebp - 0xc]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1082daa
call esi
test eax, eax
jg 0x1082d91
call esi
mov ebx, eax
jmp 0x1082da1
call esi
mov ebx, eax
and ebx, 0xffff
or ebx, 0x80070000
test ebx, ebx
jl 0x1082dca
mov ebx, 0x80004005
test ebx, ebx
jl 0x1082dca
mov eax, dword [ebp + 0xc]
mov ecx, dword [edi]
shr eax, 1
and word [ecx + eax*2], 0
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x1082dd0
mov ecx, dword [ebp + 0xc]
shr ecx, 1
mov dword [eax], ecx
jmp 0x1082dd0
push edi
call fcn.01042113
cmp dword [ebp - 0x10], 0xffffffff
je 0x1082ddf
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret 0x10