Function at 0x4014f0
Capabilities:
Get file size
Get process heap flags
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
push eax
mov eax, 0x1058
call fcn.00402898
sub esp, eax
mov esi, edx
mov eax, dword [esp + eax]
lea edx, [ebp - 0x102c]
mov dword [ebp - 0x1040], ecx
mov dword [ebp - 0x1024], 0
mov ebx, eax
call fcn.00401390
test eax, eax
je 0x401540
lea esp, [ebp - 0xc]
mov ebx, 1
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov edi, eax
mov eax, dword [ebp - 0x102c]
mov dword [esp], eax
call sub.msi.dll_MsiCloseHandle
lea eax, [ebp - 0x1028]
sub esp, 4
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x10012
mov dword [esp + 4], 0
mov dword [esp], ebx
call sub.ole32.dll_StgOpenStorage
sub esp, 0x18
test eax, eax
jne 0x4016c0
cmp word [esi], 0
mov edx, esi
mov eax, 4
je 0x4015bb
lea esi, [esi]
add edx, 2
cmp word [edx], 0
jne 0x4015a0
sub edx, esi
lea eax, [edx + 4]
mov edi, edx
sar edi, 1
cmp edx, 0x3e
ja 0x401718
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov edx, dword fs:[0x18]
mov eax, dword [edx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
sub esp, 0xc
mov dword [ebp - 0x1044], eax
test eax, eax
je 0x401718
lea eax, [edi + 1]
mov edi, dword [ebp - 0x1044]
mov ebx, esi
mov dword [ebp - 0x1048], esi
mov esi, edi
lea esi, [esi]
movzx edx, word [ebx]
lea edi, [ebx + 2]
mov dword [ebp - 0x103c], edi
mov ecx, edx
test edx, edx
je 0x4017e0
cmp edx, 0x7f
ja 0x4017ab
lea edi, [edx - 0x30]
cmp edi, 9
jbe 0x4017d0
lea edi, [edx - 0x41]
cmp edi, 0x19
jbe 0x4017a0
lea edi, [edx - 0x61]
cmp edi, 0x19
jbe 0x4019c0
cmp dx, 0x2e
je 0x401b50
mov edi, 0x483f
cmp edx, 0x5f
jne 0x4017ab
movzx edx, word [ebx + 2]
lea ecx, [edx - 1]
cmp ecx, 0x7e
ja 0x4016b0
lea ecx, [edx - 0x30]
cmp ecx, 9
jbe 0x401a10
lea ecx, [edx - 0x41]
cmp ecx, 0x19
jbe 0x401a90
lea ecx, [edx - 0x61]
cmp ecx, 0x19
jbe 0x401b48
cmp edx, 0x2e
je 0x401a80
mov ecx, 0xffffffc0
cmp edx, 0x5f
je 0x401a19
lea esi, [esi]
mov ebx, dword [ebp - 0x103c]
mov ecx, edi
jmp 0x4017b1
test byte [section..data], 4
je 0x401529
mov dword [ebp - 0x103c], eax
mov eax, ebx
call fcn.00401150
mov edx, dword [ebp - 0x103c]
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 section..text
jmp 0x401529
mov edi, dword [sym.imp.kernel32.dll_HeapFree]
mov dword [ebp - 0x1044], 0
mov ebx, 1
test byte [section..data], 4
jne 0x401a4c
lea esi, [esi]
mov esi, dword [ebp - 0x1044]
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov dword [esp + 8], esi
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call edi
mov eax, dword [ebp - 0x1024]
sub esp, 0xc
test eax, eax
je 0x40177b
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
mov eax, dword [ebp - 0x1028]
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
mov eax, ebx
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
sub edx, 0x37
test edx, edx
jns 0x401bc8
mov ebx, dword [ebp - 0x103c]
lea edx, [eax - 1]
add esi, 2
mov word [esi - 2], cx
test eax, eax
je 0x4019d0
mov eax, edx
jmp 0x401608
lea edi, [edx + 0x47d0]
jmp 0x401663
xor ecx, ecx
mov word [esi], cx
mov eax, dword [ebp - 0x1028]
lea ecx, [ebp - 0x1024]
mov edx, dword [eax]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x1011
mov esi, dword [ebp - 0x1044]
mov dword [esp], eax
mov dword [esp + 4], esi
call dword [edx + 0xc]
sub esp, 0x18
mov ebx, eax
test eax, eax
je 0x401848
test byte [section..data], 4
jne 0x401ab0
mov edi, dword [sym.imp.kernel32.dll_HeapFree]
mov ebx, 1
jmp 0x401740
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 eax, dword [ebp - 0x1040]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CreateFileW]
sub esp, 0x1c
mov dword [ebp - 0x103c], eax
cmp eax, 0xffffffff
je 0x401af0
lea eax, [ebp - 0x1020]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x103c]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetFileSize]
sub esp, 8
cmp eax, 0xffffffff
je 0x401a28
mov edx, dword [ebp - 0x1020]
test edx, edx
jne 0x401a28
mov esi, eax
mov eax, dword [ebp - 0x1024]
xor edi, edi
mov edx, dword [eax]
mov dword [esp + 4], esi
mov dword [esp + 8], edi
mov dword [esp], eax
call dword [edx + 0x18]
sub esp, 0xc
test eax, eax
jne 0x401835
mov ebx, dword [ebp - 0x103c]
mov dword [ebp - 0x1040], eax
jmp 0x401941
mov eax, dword [ebp - 0x101c]
test eax, eax
je 0x401975
mov edx, dword [ebp - 0x1024]
mov ecx, dword [edx]
mov dword [esp + 8], eax
lea eax, [ebp - 0x1018]
mov dword [esp + 0xc], 0
mov dword [esp + 4], eax
mov dword [esp], edx
call dword [ecx + 0x10]
sub esp, 0x10
test eax, eax
jne 0x401975
mov eax, dword [ebp - 0x101c]
xor edx, edx
sub esi, eax
sbb edi, edx
lea eax, [ebp - 0x101c]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x1018]
mov dword [esp + 8], 0x1000
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_ReadFile]
sub esp, 0x14
test eax, eax
jne 0x401900
mov eax, dword [ebp - 0x103c]
mov ebx, dword [ebp - 0x1040]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, edi
sub esp, 4
or eax, esi
jne 0x401b92
mov eax, dword [ebp - 0x1028]
mov edx, dword [eax]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [edx + 0x24]
mov edi, dword [sym.imp.kernel32.dll_HeapFree]
sub esp, 8
jmp 0x401740
sub edx, 0x3d
jmp 0x4017a3
mov ebx, dword [ebp - 0x1044]
mov esi, dword [ebp - 0x1048]
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov edi, dword [sym.imp.kernel32.dll_HeapFree]
mov dword [esp + 8], ebx
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call edi
sub esp, 0xc
jmp 0x40171e
lea ecx, [edx + 0x3ffff90]
shl ecx, 6
add ebx, 4
add ecx, edi
jmp 0x4017b1
test byte [section..data], 4
jne 0x401b5a
mov eax, dword [ebp - 0x103c]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
jmp 0x401835
mov eax, esi
call fcn.00401150
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 section..text
jmp 0x401740
mov ecx, 0xffffff80
jmp 0x401a19
sub edx, 0x37
cmp edx, 0xffffffff
je 0x4016b0
add edx, 0x3ffffc0
mov ecx, edx
shl ecx, 6
jmp 0x401a19
mov eax, dword [ebp - 0x1044]
call fcn.00401150
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 section..text
jmp 0x401835
test byte [section..data], 4
je 0x401835
mov eax, dword fs:[0x18]
mov ebx, dword [eax + 0x34]
mov eax, dword [ebp - 0x1040]
call fcn.00401150
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.failed_to_open_file__s___lu__n
mov dword [esp + 8], str.add_stream
mov dword [esp + 4], 0x403000
mov dword [esp], 2
call section..text
jmp 0x401835
sub edx, 0x3d
jmp 0x401a93
mov edi, 0x483e
jmp 0x401663
mov eax, dword [ebp - 0x1040]
call fcn.00401150
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 section..text
jmp 0x401a35
test byte [section..data], 4
je 0x401835
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 section..text
jmp 0x401835
lea edi, [edx + 0x4800]
jmp 0x401663