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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
push edi
xor ebx, ebx
mov eax, edx
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocStringLen
push ecx
mov dword [ebp - 0xc], eax
mov esi, ebx
mov dword [ebp - 0x18], ebx
mov edi, ebx
mov dword [eax], ebx
mov dword [ebp - 0x14], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x10], eax
cmp eax, 0xffffffff
jne 0x44070a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x4406fe
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x440737
mov esi, 0x80004005
jmp 0x4409ee
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp edi, 0xffffffff
jne 0x440737
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x440730
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x440737
mov esi, 0x80004005
test esi, esi
js 0x4409df
cmp edi, 2
jbe 0x44084b
push ebx
lea eax, [ebp - 0x14]
push eax
push 2
lea eax, [ebp - 8]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x44077e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x440777
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x44077e
mov esi, 0x80004005
cmp dword [ebp - 0x14], 2
je 0x440789
mov esi, 0x80004005
test esi, esi
js 0x4409df
mov eax, 0xfeff
cmp word [ebp - 8], ax
jne 0x4407a6
mov al, bl
sub edi, 2
jmp 0x44084e
cmp edi, 3
jbe 0x440818
mov ecx, 0x40b9cc
lea eax, [ebp - 8]
mov ax, word [eax]
cmp ax, word [ecx]
jne 0x440818
push ebx
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
jne 0x4407f1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x4407ea
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x4407f1
mov esi, 0x80004005
xor eax, eax
inc eax
cmp dword [ebp - 0x14], eax
je 0x4407fe
mov esi, 0x80004005
test esi, esi
js 0x4409df
cmp byte [ebp - 1], 0xbf
jne 0x440818
mov dword [ebp - 0x18], 0xfde9
sub edi, 3
jmp 0x44084e
push ebx
push ebx
push ebx
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x44084b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x440840
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x4409df
mov esi, 0x80004005
xor eax, eax
inc eax
test esi, esi
js 0x4409df
test al, al
je 0x440965
lea eax, [edi + 1]
push eax
call fcn.0044183a
mov dword [ebp - 0x1c], eax
pop ecx
test eax, eax
jne 0x440874
mov esi, 0x8007000e
test esi, esi
js 0x4409df
push ebx
lea ecx, [ebp - 8]
push ecx
push edi
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4408b2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x4408a7
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x440959
mov esi, 0x80004005
mov edi, dword [ebp - 0x1c]
test esi, esi
js 0x44095c
push ebx
push ebx
push dword [ebp - 8]
push edi
push ebx
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ecx, eax
mov dword [ebp - 0x1c], ecx
cmp ecx, 0x7ffffffe
ja 0x4408e5
inc ecx
call fcn.0043fc77
mov ecx, dword [ebp - 0x1c]
jmp 0x4408e7
mov eax, ebx
mov edx, dword [ebp - 0xc]
mov dword [edx], eax
test eax, eax
jne 0x4408f5
mov esi, 0x8007000e
test esi, esi
js 0x44095c
cmp dword [ebp - 8], ebx
jbe 0x440935
push ecx
push eax
push dword [ebp - 8]
push edi
push ebx
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ebx, eax
test ebx, ebx
jne 0x440932
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x44092b
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x44094f
mov esi, 0x80004005
mov edx, dword [ebp - 0xc]
test esi, esi
js 0x44094f
mov eax, dword [edx]
xor edx, edx
mov ecx, dword [ebp - 0x1c]
mov word [eax + ecx*2], dx
mov eax, dword [ebp + 8]
test eax, eax
je 0x44095c
mov dword [eax], ebx
jmp 0x44095c
mov ecx, dword [ebp - 0xc]
call fcn.0043fd05
jmp 0x44095c
mov edi, dword [ebp - 0x1c]
push edi
call fcn.00441807
pop ecx
jmp 0x4409df
mov ecx, edi
shr ecx, 1
inc ecx
call fcn.0041fb3c
mov ecx, dword [ebp - 0xc]
mov dword [ecx], eax
test eax, eax
jne 0x44097d
mov esi, 0x8007000e
test esi, esi
js 0x4409df
push ebx
lea ecx, [ebp - 0x1c]
push ecx
push edi
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4409b3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x4409ac
movzx esi, si
or esi, 0x80070000
test esi, esi
js 0x4409d7
mov esi, 0x80004005
test esi, esi
js 0x4409d7
mov eax, dword [ebp - 0xc]
xor edx, edx
mov ecx, dword [ebp - 0x1c]
shr ecx, 1
mov eax, dword [eax]
mov word [eax + ecx*2], dx
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x4409df
mov eax, dword [ebp - 0x1c]
shr eax, 1
mov dword [ecx], eax
jmp 0x4409df
mov ecx, dword [ebp - 0xc]
call fcn.0043fd05
mov eax, dword [ebp - 0x10]
cmp eax, 0xffffffff
je 0x4409ee
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8