Function at 0x10004650
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
mov esi, dword [ebp + 0x14]
mov eax, esi
imul eax, eax, 0x193
push edi
mov dword [ebp - 0x18], eax
cmp esi, eax
ja 0x100048f3
mov edi, dword [ebp + 0xc]
xor ebx, ebx
cmp esi, 0xf6c
ja 0x100047f9
je 0x100048f3
cmp esi, 0x540
ja 0x1000474c
je 0x100046f4
mov eax, esi
sub eax, 0x2a
je 0x100046c1
sub eax, 0x3d
je 0x100046b1
sub eax, 0x1b
jne 0x100048de
mov dword [ebp - 4], ebx
jmp 0x100048de
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [ebp - 0x14], eax
jmp 0x100048de
mov eax, dword [edi + 4]
add eax, 0x50
push eax
mov dword [ebp - 0xc], ebx
mov dword [edi + 0x2c], 4
call fcn.100018e0
mov eax, dword [edi + 0x3c]
add esp, 4
cmp eax, ebx
je 0x100046e7
mov ecx, dword [edi + 0x40]
mov dword [eax + 0x40], ecx
mov edx, dword [edi + 0x40]
mov eax, dword [edi + 0x3c]
mov dword [edx], eax
jmp 0x100048de
mov ecx, dword [edi + 4]
xchg dword [ebp - 0x10], eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push edi
push ebx
push ebx
push ebx
push 0x28
push ebx
mov dword [ecx + 0x50], ebx
call fcn.10021e70
add esp, 0x30
mov dword [ebp - 0xc], eax
cmp eax, ebx
je 0x100048de
push str.get_MaxPrintSchemaVersion
push 0x1003455f
push ebx
push 0x1003455f
push 0x100345f0
push 2
call fcn.100021f0
mov ecx, dword [ebp - 0xc]
add esp, 0x18
mov esi, 0xa56
mov dword [ebp - 8], ecx
jmp 0x100048de
cmp esi, 0xa56
je 0x100047e4
cmp esi, 0xce0
jne 0x100048de
mov esi, dword [ebp - 0x14]
push ebx
push 0x1003f908
push 0x800
push 0x1003f90c
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x100047c8
mov eax, dword [0x1003f908]
cmp eax, ebx
jbe 0x100047ad
mov byte [eax + 0x1003f90c], bl
mov ecx, dword [0x1004014c]
push ecx
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov edx, dword [0x10040150]
push 0xffffffffffffffff
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push ebx
push 0x1003f908
push 0x800
push 0x1003f90c
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x10004782
mov eax, dword [0x1004014c]
push eax
mov esi, 0xce0
mov dword [0x1003f908], ebx
call dword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x100048de
push es
int1
iretd
cmp esi, 0x25d2
ja 0x1000484a
je 0x100048f3
cmp esi, 0x1040
je 0x1000483b
cmp esi, 0x1959
je 0x10004833
cmp esi, 0x1ffe
jne 0x100048de
cmp dword [ebp + 0x10], ebx
jne 0x100048de
push str.bufferExtent
jmp 0x10004876
mov dword [ebp - 8], ebx
jmp 0x100048de
cmp edi, ebx
jne 0x100048de
push str.ZUNITEDEFAULT
jmp 0x10004876
cmp esi, 0x2fbc
je 0x10004868
cmp esi, 0x3f7a
jne 0x100048de
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 8]
mov ecx, dword [edx]
cmp ecx, ebx
jne 0x10004899
push str.ObjectStorage.cpp
push 0x1003455f
push ebx
push 0x1003455f
push 0x1003455c
push 2
call fcn.100021f0
add esp, 0x18
mov dword [ebp - 4], 2
jmp 0x100048d9
mov eax, dword [edi + 0xb0]
cmp eax, ebx
jne 0x100048cb
push str.cancel_plugin_callback_is_not_defined
push 0x1003455f
push ebx
push 0x1003455f
push 0x1003455c
push 2
call fcn.100021f0
add esp, 0x18
mov dword [ebp - 4], 7
jmp 0x100048d9
push ecx
mov ecx, dword [ebp + 0x10]
push ecx
push edi
call eax
add esp, 0xc
mov dword [ebp - 4], eax
mov esi, 0x2fbc
mov eax, dword [ebp + 0x14]
mov edx, eax
shl edx, 5
sub edx, eax
add esi, edx
cmp esi, dword [ebp - 0x18]
jbe 0x10004674
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret