Function at 0x10038180
Capabilities:
Read file on windows

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10090b17
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x198
mov eax, dword [0x100ba00c]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebx + 8]
lea ecx, [ebp - 0x170]
mov esi, dword [sym.imp.HncFoundation.dll_public:_void___thiscall_CHncStringW::constructor_void_]
mov dword [ebp - 0x188], eax
mov eax, dword [ebx + 0xc]
mov dword [ebp - 0x184], eax
mov dword [ebp - 0x180], 0xffffffff
mov dword [ebp - 0x190], 0xffffffff
call esi
lea ecx, [ebp - 0x16c]
mov dword [ebp - 4], 0
call esi
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x170]
mov edi, dword [sym.imp.HncFoundation.dll_public:_int___thiscall_CHncStringW::Assign_unsigned_short_int_const__]
push str.UNKNOWN
call edi
push 0x1009baa8
lea ecx, [ebp - 0x16c]
call edi
lea ecx, [ebp - 0x17c]
call esi
xorps xmm0, xmm0
mov dword [ebp - 0x178], 0
lea eax, [ebp - 0x198]
mov dword [ebp - 0x18c], 0
movq qword [ebp - 0x198], xmm0
mov dword [ebp - 0x19c], eax
mov dword [ebp - 0x1a0], 0
push 0x3039
mov byte [ebp - 4], 3
call dword [sym.imp.HwpApp.dll_Ordinal_6]
mov esi, eax
mov eax, dword [ebp - 0x184]
mov edx, dword [eax]
test edx, edx
je 0x1003828e
mov ecx, dword [edx]
push edx
call dword [ecx + 8]
mov eax, dword [ebp - 0x184]
mov dword [eax], esi
test esi, esi
jne 0x100382c4
lea ecx, [ebp - 0x1a0]
call fcn.10002d70
mov esi, dword [sym.imp.HncFoundation.dll_public:_void___thiscall_CHncStringW::destructor_void_]
lea ecx, [ebp - 0x17c]
call esi
lea ecx, [ebp - 0x16c]
call esi
lea ecx, [ebp - 0x170]
call esi
xor eax, eax
jmp 0x10038974
mov esi, dword [ebp - 0x188]
lea edx, [ebp - 0x17c]
mov ecx, esi
call fcn.10080b20
mov eax, dword [ebp - 0x17c]
cmp dword [eax - 8], 0
jne 0x100382f2
push esi
lea ecx, [ebp - 0x17c]
call edi
mov eax, dword [ebp - 0x17c]
mov cx, word [0x1009db8c]
movups xmm0, xmmword [str.HWP_Document_File]
mov word [ebp - 0x48], cx
lea ecx, [ebp - 0x174]
push ecx
push 0
push 0
push 0x40040
movups xmmword [ebp - 0x58], xmm0
push 0
xorps xmm0, xmm0
mov dword [ebp - 0x3e], 0
push eax
movq qword [ebp - 0x46], xmm0
mov word [ebp - 0x3a], 0
call dword [sym.imp.ole32.dll_StgOpenStorage]
test eax, eax
js 0x10038466
mov eax, dword [ebp - 0x174]
lea edx, [ebp - 0x188]
push edx
push 0
push 0x10
mov ecx, dword [eax]
push 0
push str.FileHeader
push eax
call dword [ecx + 0x10]
test eax, eax
jns 0x10038371
mov eax, dword [ebp - 0x174]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
jmp 0x10038466
mov eax, dword [ebp - 0x188]
lea edx, [ebp - 0x1a4]
push edx
push 0x30
lea edx, [ebp - 0x168]
mov ecx, dword [eax]
push edx
push eax
call dword [ecx + 0xc]
test eax, eax
js 0x10038441
lea ecx, [ebp - 0x168]
mov esi, 0x1c
lea edx, [ebp - 0x58]
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x10038441
add ecx, 4
add edx, 4
sub esi, 4
jae 0x100383a3
push 0x1009d768
lea ecx, [ebp - 0x170]
mov dword [ebp - 0x18c], 1
call edi
mov eax, dword [ebp - 0x144]
test al, 2
je 0x100383f1
mov esi, dword [ebp - 0x13c]
mov ecx, 2
test esi, esi
cmove esi, ecx
mov dword [ebp - 0x180], esi
jmp 0x100383fb
mov dword [ebp - 0x180], 0
mov ecx, dword [ebp - 0x148]
and eax, 1
mov dword [ebp - 0x190], eax
movzx eax, cl
push eax
mov eax, ecx
mov dword [ebp - 0x178], ecx
shr eax, 8
movzx eax, al
push eax
mov eax, ecx
shr eax, 0x10
movzx eax, al
push eax
mov eax, ecx
shr eax, 0x18
push eax
lea eax, [ebp - 0x16c]
push str._x._x._x._x
push eax
call dword [sym.imp.HncFoundation.dll_public:_int___cdecl_CHncStringW::Format_unsigned_short_int_const__]
add esp, 0x18
mov eax, dword [ebp - 0x188]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [ebp - 0x174]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
cmp dword [ebp - 0x18c], 0
jne 0x100387f9
push 0x80
lea eax, [ebp - 0x138]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov eax, dword [0x1009dbd8]
add esp, 0xc
movups xmm0, xmmword [str.HWP_Document_File_V3.00]
mov dword [ebp - 0x60], eax
movzx eax, word [0x1009dbdc]
mov word [ebp - 0x5c], ax
movzx eax, byte [0x1009dbde]
mov byte [ebp - 0x5a], al
mov eax, dword [0x1009dbf8]
mov dword [ebp - 0x80], eax
movzx eax, word [0x1009dbfc]
movups xmmword [ebp - 0x78], xmm0
mov word [ebp - 0x7c], ax
movq xmm0, qword [0x1009dbd0]
movzx eax, byte [0x1009dbfe]
movq qword [ebp - 0x68], xmm0
movups xmm0, xmmword [str.HWP_Document_File_V2.10]
mov byte [ebp - 0x7a], al
mov eax, dword [0x1009dc18]
mov dword [ebp - 0xa0], eax
movzx eax, word [0x1009dc1c]
movups xmmword [ebp - 0x98], xmm0
mov word [ebp - 0x9c], ax
movq xmm0, qword [0x1009dbf0]
movzx eax, byte [0x1009dc1e]
movq qword [ebp - 0x88], xmm0
movups xmm0, xmmword [str.HWP_Document_File_V2.00]
mov byte [ebp - 0x9a], al
mov eax, dword [0x1009dc38]
movups xmmword [ebp - 0xb8], xmm0
mov dword [ebp - 0x140], eax
movq xmm0, qword [0x1009dc10]
movzx eax, word [0x1009dc3c]
movq qword [ebp - 0xa8], xmm0
movups xmm0, xmmword [str.HWP_Document_File_V1.20]
mov word [ebp - 0x13c], ax
movzx eax, byte [0x1009dc3e]
mov byte [ebp - 0x13a], al
mov eax, dword [0x1009dc58]
movups xmmword [ebp - 0x158], xmm0
mov dword [ebp - 0x40], eax
movq xmm0, qword [0x1009dc30]
movzx eax, word [0x1009dc5c]
movq qword [ebp - 0x148], xmm0
movups xmm0, xmmword [str.HWP_Document_File_V1.10]
mov word [ebp - 0x3c], ax
movzx eax, byte [0x1009dc5e]
push 0x1009d800
push dword [ebp - 0x17c]
mov byte [ebp - 0x3a], al
lea eax, [ebp - 0x174]
movups xmmword [ebp - 0x58], xmm0
push eax
movq xmm0, qword [0x1009dc50]
movq qword [ebp - 0x48], xmm0
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wfopen_s]
mov ecx, dword [ebp - 0x174]
add esp, 0xc
test ecx, ecx
je 0x100387f9
test eax, eax
jne 0x100387eb
push ecx
push 0x1e
lea eax, [ebp - 0x38]
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x10
cmp eax, 0x1e
jne 0x100387e5
mov byte [ebp - 0x1a], 0
lea ecx, [ebp - 0x38]
lea edx, [ebp - 0x78]
lea esi, [eax - 3]
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x10038695
add ecx, 4
add edx, 4
sub esi, 4
jae 0x10038602
mov ax, word [ecx]
cmp ax, word [edx]
jne 0x10038695
mov al, byte [ecx + 2]
cmp al, byte [edx + 2]
jne 0x10038695
push 0x1009d768
lea ecx, [ebp - 0x170]
call edi
push 0x1009dc60
lea ecx, [ebp - 0x16c]
call edi
push dword [ebp - 0x174]
lea eax, [ebp - 0x138]
mov dword [ebp - 0x178], 0x3000000
push 0x80
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x10
cmp eax, 0x80
jne 0x10038695
cmp byte [ebp - 0xd8], 0
jne 0x1003868b
cmp byte [ebp - 0xd7], 0
mov dword [ebp - 0x180], 0
je 0x10038695
mov dword [ebp - 0x180], 1
lea ecx, [ebp - 0x38]
mov esi, 0x1b
lea edx, [ebp - 0x98]
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x100386e8
add ecx, 4
add edx, 4
sub esi, 4
jae 0x100386a3
mov ax, word [ecx]
cmp ax, word [edx]
jne 0x100386e8
mov al, byte [ecx + 2]
cmp al, byte [edx + 2]
jne 0x100386e8
push 0x1009d768
lea ecx, [ebp - 0x170]
call edi
push 0x1009dc68
lea ecx, [ebp - 0x16c]
call edi
mov dword [ebp - 0x178], 0x2010000
lea ecx, [ebp - 0x38]
mov esi, 0x1b
lea edx, [ebp - 0xb8]
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x1003873b
add ecx, 4
add edx, 4
sub esi, 4
jae 0x100386f6
mov ax, word [ecx]
cmp ax, word [edx]
jne 0x1003873b
mov al, byte [ecx + 2]
cmp al, byte [edx + 2]
jne 0x1003873b
push 0x1009d768
lea ecx, [ebp - 0x170]
call edi
push 0x1009dc70
lea ecx, [ebp - 0x16c]
call edi
mov dword [ebp - 0x178], 0x2000000
lea ecx, [ebp - 0x38]
mov esi, 0x1b
lea edx, [ebp - 0x158]
nop dword [eax]
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x10038795
add ecx, 4
add edx, 4
sub esi, 4
jae 0x10038750
mov ax, word [ecx]
cmp ax, word [edx]
jne 0x10038795
mov al, byte [ecx + 2]
cmp al, byte [edx + 2]
jne 0x10038795
push 0x1009d768
lea ecx, [ebp - 0x170]
call edi
push 0x1009dc78
lea ecx, [ebp - 0x16c]
call edi
mov dword [ebp - 0x178], 0x1020000
lea ecx, [ebp - 0x38]
mov esi, 0x1b
lea edx, [ebp - 0x58]
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x100387e5
add ecx, 4
add edx, 4
sub esi, 4
jae 0x100387a0
mov ax, word [ecx]
cmp ax, word [edx]
jne 0x100387e5
mov al, byte [ecx + 2]
cmp al, byte [edx + 2]
jne 0x100387e5
push 0x1009d768
lea ecx, [ebp - 0x170]
call edi
push 0x1009dc80
lea ecx, [ebp - 0x16c]
call edi
mov dword [ebp - 0x178], 0x1010000
mov ecx, dword [ebp - 0x174]
test ecx, ecx
je 0x100387f9
push ecx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
push dword [ebp - 0x170]
mov esi, dword [sym.imp.OLEAUT32.dll_SysReAllocString]
call esi
xorps xmm0, xmm0
mov dword [ebp - 0x38], 1
movsd qword [ebp - 0x30], xmm0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x184]
lea edx, [ebp - 0x38]
mov byte [ebp - 4], 4
push edx
push 0x7001
mov eax, dword [eax]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x2c]
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x38]
mov edi, dword [sym.imp.HncFoundation.dll_public:_void___thiscall_tagHNCPARAM::ParamClear_void_]
call edi
push dword [ebp - 0x16c]
call esi
xorps xmm0, xmm0
mov dword [ebp - 0x38], 1
movsd qword [ebp - 0x30], xmm0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x30], eax
mov esi, dword [ebp - 0x184]
lea edx, [ebp - 0x38]
mov byte [ebp - 4], 7
push edx
push 0x7002
mov eax, dword [esi]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x2c]
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 9
call edi
mov eax, dword [ebp - 0x178]
xorps xmm0, xmm0
movsd qword [ebp - 0x30], xmm0
mov dword [ebp - 0x38], 8
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x30], eax
mov byte [ebp - 4], 0xa
lea edx, [ebp - 0x38]
mov eax, dword [esi]
push edx
push 0x7003
push eax
mov ecx, dword [eax]
call dword [ecx + 0x2c]
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 0xb
call edi
mov eax, dword [ebp - 0x180]
xorps xmm0, xmm0
movsd qword [ebp - 0x30], xmm0
mov dword [ebp - 0x38], 4
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x30], eax
mov byte [ebp - 4], 0xc
lea edx, [ebp - 0x38]
mov eax, dword [esi]
push edx
push 0x7004
push eax
mov ecx, dword [eax]
call dword [ecx + 0x2c]
mov byte [ebp - 4], 0xd
lea ecx, [ebp - 0x38]
call edi
mov eax, dword [ebp - 0x190]
xorps xmm0, xmm0
movsd qword [ebp - 0x30], xmm0
mov dword [ebp - 0x38], 4
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x30], eax
mov byte [ebp - 4], 0xe
lea edx, [ebp - 0x38]
mov eax, dword [esi]
push edx
push 0x7005
push eax
mov ecx, dword [eax]
call dword [ecx + 0x2c]
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 0xf
call edi
lea ecx, [ebp - 0x1a0]
call fcn.10002d70
mov esi, dword [sym.imp.HncFoundation.dll_public:_void___thiscall_CHncStringW::destructor_void_]
lea ecx, [ebp - 0x17c]
call esi
lea ecx, [ebp - 0x16c]
call esi
lea ecx, [ebp - 0x170]
call esi
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.1008cdc9
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 8