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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6405d0
mov eax, dword fs:[0]
push eax
sub esp, 0x13c
mov eax, dword [0x6d3438]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov ebx, ecx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x34], edx
test edx, edx
je 0x46e1d3
xor eax, eax
cmp ax, word [edx]
je 0x46e1d3
push eax
push 0x80
push 3
push eax
push 1
push SysReAllocStringLen
push edx
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x46dfa8
xor edi, edi
push eax
mov dword [ebp - 0x18], edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
xor ecx, ecx
mov dword [ebp - 0x38], eax
jmp 0x46e03e
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
test edi, edi
jne 0x46dfce
mov dword [ebp - 0x18], edi
test esi, esi
je 0x46dfc5
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
xor ecx, ecx
mov dword [ebp - 0x38], eax
jmp 0x46e03e
lea eax, [edi + 1]
push 0x6811e4
push eax
call fcn.00608f39
add esp, 8
mov dword [ebp - 0x38], eax
test eax, eax
jne 0x46dfff
xor edi, edi
mov dword [ebp - 0x18], edi
test esi, esi
je 0x46dfc5
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
xor ecx, ecx
mov dword [ebp - 0x38], eax
jmp 0x46e03e
push 0
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x30], 0
push ecx
push edi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x46e06d
mov ecx, dword [ebp - 0x30]
cmp ecx, edi
jne 0x46e06d
mov eax, dword [ebp - 0x38]
mov edi, eax
mov dword [ebp - 0x18], edi
mov byte [ecx + eax], 0
test esi, esi
je 0x46e03c
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
mov dword [ebp - 0x38], eax
mov ecx, eax
mov byte [ebp - 4], 1
test ecx, ecx
jne 0x46e09a
mov dword [ebx], ecx
mov dword [ebx + 0x10], ecx
mov dword [ebx + 0x14], 7
mov word [ebx], cx
test eax, eax
je 0x46e218
push 1
push eax
call fcn.00608415
add esp, 8
jmp 0x46e218
push 1
push dword [ebp - 0x38]
xor edi, edi
mov dword [ebp - 0x18], edi
call fcn.00608415
xor eax, eax
add esp, 8
xor ecx, ecx
mov dword [ebp - 0x38], eax
test esi, esi
je 0x46e03e
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
xor ecx, ecx
mov dword [ebp - 0x38], eax
jmp 0x46e03e
push 0xfde9
lea eax, [ebp - 0x144]
push edi
lea ecx, [ebp - 0x148]
mov dword [ebp - 0x148], eax
call fcn.00447410
mov byte [ebp - 4], 2
xor eax, eax
mov edx, dword [ebp - 0x148]
mov ecx, edx
mov dword [ebx], 0
mov dword [ebx + 0x10], 0
mov dword [ebx + 0x14], 7
mov word [ebx], ax
lea esi, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x46e0e0
sub ecx, esi
sar ecx, 1
push ecx
push edx
mov ecx, ebx
call fcn.0042e850
mov eax, dword [ebp - 0x148]
lea ecx, [ebp - 0x144]
cmp eax, ecx
je 0x46e111
push eax
call fcn.0060dd99
add esp, 4
push 1
push dword [ebp - 0x38]
call fcn.00608415
add esp, 8
jmp 0x46e218
push 5
call fcn.0049dcb0
add esp, 4
test eax, eax
je 0x46e1ff
push 0x69a85c
push 0x56
push str.McAfee::Script::CFileUtility::ReadFile
mov edx, str.E:BT430b185a_855c_4893_bfb8_5d7192a0aa53ScriptHostJavaScriptCommon_srcFileUtility.cpp
mov ecx, 5
call fcn.00438de0
add esp, 0xc
xor eax, eax
mov dword [ebx], 0
mov dword [ebx + 0x10], 0
mov dword [ebx + 0x14], 7
mov word [ebx], ax
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00608185
mov esp, ebp
pop ebp
ret