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

Disassembly:
push ebp
push edi
push esi
push ebx
push eax
mov eax, 0x1058
call fcn.004027d8
sub esp, eax
mov ebp, edx
mov esi, ecx
mov eax, dword [esp + eax]
lea edx, [esp + 0x3c]
mov dword [esp + 0x44], 0
mov edi, eax
call fcn.00401350
test eax, eax
je 0x401518
add esp, 0x105c
mov ebx, 1
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebx, eax
mov eax, dword [esp + 0x3c]
mov dword [esp], eax
call sub.msi.dll_MsiCloseHandle
sub esp, 4
lea eax, [esp + 0x40]
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x10012
mov dword [esp + 4], 0
mov dword [esp], edi
call dword [sym.imp.ole32.dll_StgOpenStorage]
sub esp, 0x18
test eax, eax
jne 0x401660
movzx edi, word [ebp]
mov eax, ebp
mov edx, 4
test di, di
je 0x401593
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x401578
sub eax, ebp
lea edx, [eax + 4]
mov ebx, eax
sar ebx, 1
cmp eax, 0x3e
ja 0x4016b0
mov dword [esp], edx
call dword [sym.imp.ucrtbase.dll_malloc]
mov dword [esp + 0x24], eax
test eax, eax
je 0x4016b0
mov ecx, dword [esp + 0x24]
mov eax, ebp
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x28], esi
lea esi, [esi]
lea esi, [esi]
lea esi, [eax + 2]
movzx edx, di
test edx, edx
je 0x401780
cmp edx, 0x7f
ja 0x401735
cmp di, 0x5a
ja 0x401758
cmp di, 0x40
ja 0x401808
cmp di, 0x2e
je 0x4017f8
lea ebp, [edi - 0x30]
cmp bp, 9
ja 0x401735
lea edi, [edx + 0x47d0]
mov dword [esp + 0x20], edi
movzx edx, word [eax + 2]
lea ebp, [edx - 1]
mov edi, edx
cmp ebp, 0x7e
ja 0x401730
cmp dx, 0x5a
ja 0x401710
cmp dx, 0x40
ja 0x401a30
cmp dx, 0x2e
je 0x401a10
sub edi, 0x30
cmp di, 9
ja 0x401730
add edx, 0x3ffff90
shl edx, 6
jmp 0x401999
test byte [section..data], 4
je 0x4014ff
mov dword [esp + 0x20], eax
mov eax, edi
call fcn.00401060
mov edx, dword [esp + 0x20]
mov dword [esp + 0xc], str.failed_to_open_storage__s__0x_08lx__n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.add_stream
mov dword [esp + 4], 0x403000
mov dword [esp + 0x14], edx
mov dword [esp], 2
call fcn.00401300
jmp 0x4014ff
mov esi, dword [sym.imp.ucrtbase.dll_free]
mov dword [esp + 0x24], 0
mov ebx, 1
test byte [section..data], 4
jne 0x4019d2
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call esi
mov eax, dword [esp + 0x44]
test eax, eax
je 0x4016ec
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
mov eax, dword [esp + 0x40]
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
mov eax, ebx
sub esp, 4
add esp, 0x105c
pop ebx
pop esi
pop edi
pop ebp
ret
cmp dx, 0x5f
je 0x401a20
sub edi, 0x61
cmp di, 0x19
jbe 0x401990
lea esi, [esi]
nop
movzx edi, word [esp + 0x20]
add ecx, 2
mov word [ecx - 2], di
cmp ebx, 0xffffffff
je 0x401970
movzx edi, word [esi]
sub ebx, 1
mov eax, esi
jmp 0x4015c0
cmp di, 0x5f
je 0x4017e8
lea ebp, [edi - 0x61]
cmp bp, 0x19
ja 0x401735
lea edi, [edx + 0x47c3]
mov dword [esp + 0x20], edi
jmp 0x40160c
mov eax, dword [esp + 0x40]
xor ebx, ebx
mov word [ecx], bx
lea ecx, [esp + 0x44]
mov esi, dword [esp + 0x28]
mov edx, dword [eax]
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x1011
mov dword [esp], eax
mov dword [esp + 4], ecx
call dword [edx + 0xc]
sub esp, 0x18
mov ebx, eax
test eax, eax
je 0x401820
test byte [section..data], 4
jne 0x401a40
mov esi, dword [sym.imp.ucrtbase.dll_free]
mov ebx, 1
jmp 0x4016d0
mov dword [esp + 0x20], 0x483f
jmp 0x40160c
mov dword [esp + 0x20], 0x483e
jmp 0x40160c
lea edi, [edx + 0x47c9]
mov dword [esp + 0x20], edi
jmp 0x40160c
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], 0x80000000
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_CreateFileW]
sub esp, 0x1c
mov dword [esp + 0x20], eax
cmp eax, 0xffffffff
je 0x401a80
lea eax, [esp + 0x48]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetFileSize]
sub esp, 8
cmp eax, 0xffffffff
je 0x4019b0
mov edx, dword [esp + 0x48]
test edx, edx
jne 0x4019b0
mov edi, eax
mov eax, dword [esp + 0x44]
xor ebp, ebp
mov edx, dword [eax]
mov dword [esp + 4], edi
mov dword [esp + 8], ebp
mov dword [esp], eax
call dword [edx + 0x18]
sub esp, 0xc
test eax, eax
jne 0x4017d3
mov ebx, dword [esp + 0x20]
lea esi, [esp + 0x50]
mov dword [esp + 0x28], eax
jmp 0x401902
mov eax, dword [esp + 0x4c]
test eax, eax
je 0x40192e
mov edx, dword [esp + 0x44]
mov ecx, dword [edx]
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov dword [esp + 4], esi
mov dword [esp], edx
call dword [ecx + 0x10]
sub esp, 0x10
test eax, eax
jne 0x40192e
sub edi, dword [esp + 0x4c]
sbb ebp, 0
lea eax, [esp + 0x4c]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x1000
mov dword [esp + 4], esi
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_ReadFile]
sub esp, 0x14
test eax, eax
jne 0x4018d0
mov eax, dword [esp + 0x20]
mov ebx, dword [esp + 0x28]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, edi
sub esp, 4
or eax, ebp
jne 0x401b02
mov eax, dword [esp + 0x40]
mov edx, dword [eax]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [edx + 0x24]
mov esi, dword [sym.imp.ucrtbase.dll_free]
sub esp, 8
jmp 0x4016d0
mov eax, dword [esp + 0x24]
mov ebp, dword [esp + 0x2c]
mov esi, dword [sym.imp.ucrtbase.dll_free]
mov dword [esp], eax
call esi
jmp 0x4016b6
add edx, 0x3ffff83
shl edx, 6
movzx edi, word [esp + 0x20]
lea esi, [eax + 4]
add edi, edx
jmp 0x401735
test byte [section..data], 4
jne 0x401ace
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
jmp 0x4017d3
mov eax, ebp
call fcn.00401060
mov dword [esp + 0xc], str.failed_to_encode_stream_name__s_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.add_stream
mov dword [esp + 4], 0x403000
mov dword [esp], 2
call fcn.00401300
jmp 0x4016d0
mov edx, 0xffffff80
jmp 0x401999
mov edx, 0xffffffc0
jmp 0x401999
add edx, 0x3ffff89
shl edx, 6
jmp 0x401999
mov eax, dword [esp + 0x24]
call fcn.00401060
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.failed_to_create_stream__s__0x_08lx__n
mov dword [esp + 8], str.add_stream
mov dword [esp + 4], 0x403000
mov dword [esp], 2
call fcn.00401300
jmp 0x4017d3
test byte [section..data], 4
je 0x4017d3
mov eax, dword fs:[0x18]
mov ebx, dword [eax + 0x34]
mov eax, esi
call fcn.00401060
mov dword [esp + 0xc], str.failed_to_open_file__s___lu__n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.add_stream
mov dword [esp + 0x14], ebx
mov dword [esp + 4], 0x403000
mov dword [esp], 2
call fcn.00401300
jmp 0x4017d3
mov eax, esi
call fcn.00401060
mov dword [esp + 0xc], str.file__s_too_big_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.add_stream
mov dword [esp + 4], 0x403000
mov dword [esp], 2
call fcn.00401300
jmp 0x4019bd
test byte [section..data], 4
je 0x4017d3
mov dword [esp + 0xc], str.failed_to_write_stream_contents_n
mov dword [esp + 8], str.add_stream
mov dword [esp + 4], 0x403000
mov dword [esp], 2
call fcn.00401300
jmp 0x4017d3