Function at 0x402540
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x40
mov eax, dword [0x448010]
mov edi, ecx
mov ecx, dword [ebp + 8]
xor eax, ebp
mov dword [esp + 0x38], eax
mov esi, dword [ecx + 4]
mov eax, dword [esi + 0x74]
cmp eax, 1
jbe 0x40271b
mov ecx, dword [ecx]
neg ecx
lea esi, [esi + ecx + 0x80]
cmp eax, 1
jbe 0x402726
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp eax, 0xffffffff
je 0x402743
xorps xmm0, xmm0
lea eax, [esp + 0x20]
mov dword [esp + 8], edi
mov dword [esp + 0x30], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
lea edx, [esp + 0x1c]
lea ecx, [esp + 0x10]
movaps xmmword [esp + 0x20], xmm0
mov dword [esp + 0x28], esi
push eax
push edx
push 8
push ecx
mov dword [esp + 0x1c], ebx
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4026b3
cmp dword [esp + 0x1c], 8
jne 0x4026b3
mov edi, dword [ebp + 0xc]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov ebx, sym.firefox.exe_Ordinal_0
and ebx, 0xfffffffc
add ebx, esi
mov edx, ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], ecx
lea ecx, [esp + 0x20]
push edi
push 8
call fcn.004075a0
add esp, 8
mov eax, dword [esp + 0x30]
test eax, eax
js 0x402770
lea eax, [esp + 0x1c]
push eax
push 8
lea eax, [esp + 0x18]
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x4026e5
xor esi, esi
cmp dword [esp + 0x1c], 8
jne 0x4026e5
cmp dword [esp + 0x30], 0
mov edi, dword [esp + 8]
mov ebx, dword [esp + 0xc]
js 0x402687
lea eax, [esp + 0x2c]
push eax
push dword [esp + 0x30]
push dword [esp + 0x2c]
push dword [esp + 0x2c]
push dword [esp + 0x38]
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test esi, esi
jne 0x40268f
mov byte [edi + 0xc], 0
mov eax, ebx
inc eax
cmp eax, 2
jb 0x40269e
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x38]
xor ecx, ebp
call fcn.0043c380
mov eax, edi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [esp + 8]
movzx ecx, ax
mov ebx, dword [esp + 0xc]
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
mov byte [edi + 0xc], 1
mov dword [edi], str._builds_worker_workspace_obj_build_dist_include_mozilla_ImportDir.h
mov dword [edi + 4], 0x16
mov dword [edi + 8], ecx
jmp 0x40268f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [esp + 8]
movzx ecx, ax
mov esi, 1
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
mov byte [edx + 0xc], 1
mov dword [edx], str._builds_worker_workspace_obj_build_dist_include_mozilla_ImportDir.h
mov dword [edx + 4], 0x63
mov dword [edx + 8], ecx
jmp 0x40265d
xor esi, esi
cmp eax, 1
ja 0x40257f
mov byte [edi + 0xc], 1
mov dword [edi], str._builds_worker_workspace_obj_build_dist_include_mozilla_ImportDir.h
mov dword [edi + 4], 0x3c
mov dword [edi + 8], 0x800700c1
jmp 0x40269e
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
mov byte [edi + 0xc], 1
mov dword [edi], str._builds_worker_workspace_obj_build_dist_include_mozilla_ImportDir.h
mov dword [edi + 4], 0x43
or ecx, 0x80070000
test eax, eax
cmovle ecx, eax
mov dword [edi + 8], ecx
jmp 0x40268f
mov edi, dword [esp + 8]
mov ebx, dword [esp + 0xc]
mov byte [edi + 0xc], 1
mov dword [edi], str._builds_worker_workspace_obj_build_dist_include_mozilla_ImportDir.h
mov dword [edi + 4], 0x5c
mov dword [edi + 8], eax
jmp 0x40268f