Function at 0x40e990
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x38
mov dword [ebp - 0x40], ecx
mov edi, dword [ebp + 8]
mov eax, dword [0x450010]
xor eax, ebp
mov dword [ebp - 0x10], eax
mov esi, dword [edi + 0xc]
mov eax, dword [esi + 0x74]
cmp eax, 0x10
mov ecx, 0x10
cmovb ecx, eax
cmp ecx, 1
jbe 0x40eb6c
sub esi, 0xffffff80
mov ebx, esi
sub ebx, dword [edi + 8]
sub esp, 0x1c
movaps xmm0, xmmword [0x445240]
movups xmmword [esp + 4], xmm0
mov dword [esp], edx
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x80
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
je 0x40eb89
xorps xmm0, xmm0
lea edi, [ebp - 0x34]
movups xmmword [edi], xmm0
xor ecx, ecx
mov dword [edi + 0x10], ecx
mov dword [edi + 8], ebx
lea edx, [ebp - 0x20]
mov dword [edx + 4], ecx
mov dword [edx], ecx
lea ecx, [ebp - 0x3c]
push edi
push ecx
push 8
push edx
mov dword [ebp - 0x44], eax
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40eb3c
cmp dword [ebp - 0x3c], 8
jne 0x40eb3c
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], ecx
mov ebx, dword [ebp + 8]
mov ecx, ebx
push edi
call fcn.0040b510
mov eax, dword [ebx]
mov edx, dword [ebx + 0x18]
mov ecx, esi
test edx, edx
je 0x40ea72
mov ecx, esi
cmp dword [ebx + 8], esi
ja 0x40ea72
mov ecx, esi
cmp dword [ebx + 0x10], esi
jb 0x40ea72
mov ecx, esi
sub ecx, dword [ebx + 4]
add edx, ecx
mov ecx, edx
lea edi, [ebp - 0x28]
mov dword [edi - 0xc], ecx
mov edx, 8
mov dword [edi - 8], edx
mov dword [edi - 4], eax
xor ebx, ebx
mov dword [edi], ebx
mov dword [edi + 4], ebx
push edi
push 4
push edx
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x40ebbd
mov ecx, dword [ebp - 0x24]
test ecx, ecx
mov ebx, dword [ebp + 8]
js 0x40ebd9
mov ecx, ebx
lea eax, [ebp - 0x20]
push eax
call fcn.0040b510
cmp byte [ebp - 0x14], 0
jne 0x40ebef
mov eax, dword [ebx + 0x18]
test eax, eax
je 0x40ead7
cmp dword [ebx + 8], esi
ja 0x40ead7
cmp dword [ebx + 0x10], esi
jb 0x40ead7
sub esi, dword [ebx + 4]
add esi, eax
push 0
push 8
lea eax, [ebp - 0x3c]
push eax
push esi
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x40ebfa
mov bl, 1
mov esi, dword [ebp - 0x40]
cmp dword [ebp - 0x24], 0
js 0x40eb0e
push edi
push dword [ebp - 0x28]
push dword [ebp - 0x30]
push dword [ebp - 0x34]
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test bl, bl
mov ecx, dword [ebp - 0x44]
je 0x40eb19
mov byte [esi + 0xc], 0
mov eax, ecx
inc eax
cmp eax, 2
jb 0x40eb28
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004230e0
mov eax, esi
add esp, 0x38
pop esi
pop edi
pop ebx
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
mov esi, dword [ebp - 0x40]
mov byte [esi + 0xc], 1
mov dword [esi], str._builds_worker_workspace_obj_build_dist_include_mozilla_ImportDir.h
mov dword [esi + 4], 0x16
mov dword [esi + 8], ecx
mov ecx, dword [ebp - 0x44]
jmp 0x40eb19
mov esi, dword [ebp - 0x40]
mov byte [esi + 0xc], 1
mov dword [esi], str._builds_worker_workspace_obj_build_dist_include_mozilla_ImportDir.h
mov dword [esi + 4], 0x35
mov dword [esi + 8], 0x800700c1
jmp 0x40eb28
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
mov esi, dword [ebp - 0x40]
mov byte [esi + 0xc], 1
mov dword [esi], str._builds_worker_workspace_obj_build_dist_include_mozilla_ImportDir.h
mov dword [esi + 4], 0x3c
mov dword [esi + 8], ecx
mov ecx, edi
jmp 0x40eb19
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
mov dword [ebp - 0x24], ecx
jmp 0x40eaa1
mov esi, dword [ebp - 0x40]
mov byte [esi + 0xc], 1
mov dword [esi], str._builds_worker_workspace_obj_build_dist_include_mozilla_ImportDir.h
mov dword [esi + 4], 0x51
jmp 0x40ec24
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x18]
jmp 0x40ec18
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
mov eax, str._builds_worker_workspace_obj_build_dist_include_mozilla_NativeNt.h
mov edx, 0x5f3
mov esi, dword [ebp - 0x40]
mov byte [esi + 0xc], 1
mov dword [esi], eax
mov dword [esi + 4], edx
mov dword [esi + 8], ecx
xor ebx, ebx
jmp 0x40eaf5