Function at 0x41cc70
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [ebp + 8]
xor ecx, ecx
push ebx
push esi
mov esi, dword [ebp + 0xc]
xor ebx, ebx
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x2c], ecx
mov edx, 0xaa55
mov ecx, 1
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 8], 0
mov dword [ebp - 4], ebx
mov dword [ebp - 0x10], 2
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0xc], eax
cmp word [eax], dx
jne 0x41d2ad
lea esp, [esp]
push ebx
push ecx
push str.Image__d____Offset_0x_X_n
push edi
push esi
call fcn.0041d700
push ebx
push dword [ebp - 0x1c]
push str._n
push edi
push esi
call fcn.0041d700
push str.__ROM_header_contents:_n
push edi
push esi
call fcn.0041d700
mov ebx, dword [ebp - 0xc]
movzx eax, word [ebx]
push eax
push str.____Signature______________0x_04X_n
push edi
push esi
call fcn.0041d700
movzx eax, word [ebx + 0x18]
add esp, 0x44
push eax
push str.____PCIR_offset____________0x_04X_n
push edi
push esi
call fcn.0041d700
movzx ebx, word [ebx + 0x18]
add ebx, dword [ebp - 4]
push str.__PCI_Data_Structure_n
add ebx, dword [ebp + 8]
push edi
push esi
mov dword [ebp - 0x34], ebx
call fcn.0041d700
mov ecx, dword [ebx]
mov eax, ecx
shr eax, 0x18
movsx eax, al
push eax
mov eax, ecx
shr eax, 0x10
movsx eax, al
push eax
shr ecx, 8
movsx eax, cl
push eax
movsx eax, byte [ebx]
push eax
push str.____Signature_______________c_c_c_c_n
push edi
push esi
call fcn.0041d700
movzx eax, word [ebx + 4]
push eax
push str.____Vendor_ID______________0x_04X_n
push edi
push esi
call fcn.0041d700
movzx eax, word [ebx + 6]
add esp, 0x48
push eax
push str.____Device_ID______________0x_04X_n
push edi
push esi
call fcn.0041d700
movzx eax, byte [ebx + 0xc]
push eax
push str.____PCI_Revision___________0x_02X_n
push edi
push esi
call fcn.0041d700
movzx eax, word [ebx + 0x10]
shl eax, 9
push eax
push str.____Image_size_____________0x_X_n
push edi
push esi
call fcn.0041d700
movzx eax, word [ebx + 0x12]
push eax
push str.____Code_revision__________0x_04X_n
push edi
push esi
call fcn.0041d700
movzx eax, byte [ebx + 0x15]
add esp, 0x40
push eax
push str.____Indicator______________0x_02X
push edi
push esi
call fcn.0041d700
add esp, 0x10
test byte [ebx + 0x15], 0x80
je 0x41cdd4
push str.____last_image__n
jmp 0x41cdd9
push str.____Not_last_image__n
push edi
push esi
call fcn.0041d700
mov cl, byte [ebx + 0x14]
add esp, 0xc
movzx eax, cl
cmp cl, 5
mov edx, 4
cmovae eax, edx
movzx eax, al
push dword [eax*4 + 0x4473a0]
movzx eax, cl
push eax
push str.____Code_type______________0x_02X_____s__n
push edi
push esi
call fcn.0041d700
add esp, 0x14
cmp byte [ebx + 0x14], 3
jne 0x41d04e
mov eax, dword [ebp - 4]
add eax, dword [ebp + 8]
mov dword [ebp - 8], eax
push dword [eax + 4]
push str.____EFI_Signature__________0x_04X_n
push edi
push esi
call fcn.0041d700
mov edx, dword [ebp - 8]
movzx eax, word [edx + 0xc]
push eax
push str.____Compression_Type_______0x_04X
push edi
push esi
call fcn.0041d700
mov eax, dword [ebp - 8]
add esp, 0x20
cmp word [eax + 0xc], 1
jne 0x41ce5b
push str._compressed__n
jmp 0x41ce60
push str._not_compressed__n
push edi
push esi
call fcn.0041d700
xor eax, eax
add esp, 0xc
cmp dword [str.IA32], eax
je 0x41ce9e
mov edx, dword [ebp - 8]
xor ecx, ecx
movzx edx, word [edx + 0xa]
lea ecx, [ecx]
cmp word [ecx + 0x447340], dx
je 0x41d125
inc eax
lea ecx, [eax*8]
cmp dword [ecx + 0x447344], 0
jne 0x41ce80
mov eax, str.unknown
push eax
mov eax, dword [ebp - 8]
movzx eax, word [eax + 0xa]
push eax
push str.____Machine_type___________0x_04X___s__n
push edi
push esi
call fcn.0041d700
xor eax, eax
add esp, 0x14
cmp dword [str.EFI_application], eax
je 0x41ceee
mov edx, dword [ebp - 8]
xor ecx, ecx
movzx edx, word [edx + 8]
mov edi, edi
cmp word [ecx + 0x447368], dx
je 0x41d131
inc eax
lea ecx, [eax*8]
cmp dword [ecx + 0x44736c], 0
jne 0x41ced0
mov eax, str.unknown
push eax
mov eax, dword [ebp - 8]
movzx eax, word [eax + 8]
push eax
push str.____Subsystem______________0x_04X___s__n
push edi
push esi
call fcn.0041d700
mov eax, dword [ebp - 8]
movzx ecx, word [eax + 0x16]
mov eax, dword [ebp - 4]
add eax, ecx
push eax
push ecx
push str.____EFI_image_offset_______0x_04X__abs:_0x_X__n
push edi
push esi
call fcn.0041d700
mov eax, dword [ebp - 4]
mov edx, dword [ebp + 8]
add eax, 0x34
add esp, 0x28
add edx, eax
mov ecx, edx
mov dword [ebp - 0x24], edx
lea eax, [ecx + 1]
mov dword [ebp - 0x30], eax
jmp 0x41cf40
mov al, byte [ecx]
inc ecx
test al, al
jne 0x41cf40
sub ecx, dword [ebp - 0x30]
cmp ecx, 0x22
jae 0x41cf6f
mov ecx, edx
mov edx, 0x4487c8
sub edx, dword [ebp - 0x24]
lea esp, [esp]
mov al, byte [ecx]
mov byte [ecx + edx], al
lea ecx, [ecx + 1]
test al, al
jne 0x41cf60
mov edx, dword [ebp - 0x24]
mov ecx, 0x4487c8
lea eax, [ecx + 1]
mov dword [ebp - 0x30], eax
lea ebx, [ebx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x41cf80
sub ecx, dword [ebp - 0x30]
inc ecx
add edx, ecx
mov ecx, edx
mov dword [ebp - 0x24], edx
lea eax, [ecx + 1]
mov dword [ebp - 0x30], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x41cf98
sub ecx, dword [ebp - 0x30]
cmp ecx, 8
jae 0x41cfc0
mov ecx, edx
mov edx, 0x4487ea
sub edx, dword [ebp - 0x24]
mov al, byte [ecx]
mov byte [ecx + edx], al
lea ecx, [ecx + 1]
test al, al
jne 0x41cfb1
mov edx, dword [ebp - 0x24]
mov ecx, 0x4487ea
lea eax, [ecx + 1]
mov dword [ebp - 0x30], eax
jmp 0x41cfd0
mov al, byte [ecx]
inc ecx
test al, al
jne 0x41cfd0
sub ecx, dword [ebp - 0x30]
inc edx
add ecx, edx
mov edx, ecx
lea eax, [edx + 1]
mov dword [ebp - 0x30], eax
mov al, byte [edx]
inc edx
test al, al
jne 0x41cfe5
sub edx, dword [ebp - 0x30]
cmp edx, 8
jae 0x41d00c
mov edx, 0x4487f2
sub edx, ecx
jmp 0x41d000
mov al, byte [ecx]
mov byte [ecx + edx], al
lea ecx, [ecx + 1]
test al, al
jne 0x41d000
push str.__Uefi_Ids_from_EFI_PCI_EXPANSION_ROM_HEADER:__n
push edi
push esi
call fcn.0041d700
push 0x4487c8
push str.____UefiSourceRevision______s_n
push edi
push esi
call fcn.0041d700
push 0x4487ea
push str.____UefiSourceChangeList____s_n
push edi
push esi
call fcn.0041d700
push 0x4487f2
push str.____UefiBiosBuildNumber_____s_n
push edi
push esi
call fcn.0041d700
add esp, 0x3c
cmp byte [ebx + 0xc], 3
jb 0x41d14d
push str.__Extended_Info_for_PCI_3.0:_n
push edi
push esi
call fcn.0041d700
add esp, 0xc
cmp word [ebx + 8], 0
je 0x41d0de
push str.____Device_ID_List
push edi
push esi
call fcn.0041d700
movzx eax, word [ebx + 8]
mov ecx, dword [ebp - 0xc]
add eax, dword [ebp - 4]
movzx ecx, word [ecx + 0x18]
add ecx, eax
mov eax, dword [ebp + 8]
add esp, 0xc
movzx eax, word [ecx + eax]
test ax, ax
je 0x41d0cf
lea esp, [esp]
movzx eax, ax
push eax
push str.0x_04X
push edi
push esi
call fcn.0041d700
movzx eax, word [ebx + 8]
mov ecx, dword [ebp - 0xc]
add eax, dword [ebp - 4]
movzx ecx, word [ecx + 0x18]
add ecx, eax
mov eax, dword [ebp + 8]
add esp, 0x10
movzx eax, word [ecx + eax]
test ax, ax
jne 0x41d0a0
push 0x438228
push edi
push esi
call fcn.0041d700
add esp, 0xc
movzx eax, word [ebx + 0x16]
shl eax, 9
push eax
push str.____Max_Runtime_Image_Length_0x_08X_n
push edi
push esi
call fcn.0041d700
movzx eax, word [ebx + 0xa]
add esp, 0x10
cmp eax, 0x1c
jne 0x41d13d
movzx eax, word [ebx + 0x18]
push eax
push str.____Config_Utility_Header__0x_04X_n
push edi
push esi
call fcn.0041d700
movzx eax, word [ebx + 0x1a]
push eax
push str.____DMTF_CLP_Entry_Point___0x_04X_n
push edi
push esi
call fcn.0041d700
add esp, 0x20
jmp 0x41d14d
mov eax, dword [eax*8 + 0x447344]
jmp 0x41cea3
mov eax, dword [eax*8 + 0x44736c]
jmp 0x41cef3
push eax
push str.WARNING:_Oprom_declars_3.0_revision_with_wrong_structure_length_0x_04X_n
push edi
push esi
call fcn.0041d700
add esp, 0x10
cmp byte [ebx + 0x14], 3
jne 0x41d26b
mov eax, dword [ebp - 8]
cmp word [eax + 0xc], 1
movzx eax, word [eax + 0x16]
jne 0x41d25b
movzx ebx, word [ebx + 0x10]
mov ecx, dword [ebp - 4]
add ecx, eax
add ecx, dword [ebp + 8]
shl ebx, 9
sub ebx, eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x18]
push eax
push ebx
push ecx
mov dword [ebp - 0x30], ecx
call fcn.00427d50
add esp, 0x10
mov dword [ebp - 0x10], eax
test eax, eax
jne 0x41d331
push dword [ebp - 0x28]
call fcn.004297e1
add esp, 4
mov dword [ebp - 0x20], eax
test eax, eax
je 0x41d31b
push dword [ebp - 0x18]
call fcn.004297e1
add esp, 4
mov dword [ebp - 0x14], eax
test eax, eax
je 0x41d305
push dword [ebp - 0x28]
mov ecx, dword [ebp - 0x20]
push ecx
push dword [ebp - 0x18]
push eax
push ebx
push dword [ebp - 0x30]
call fcn.00427c20
mov ebx, eax
add esp, 0x18
mov dword [ebp - 0x10], ebx
test ebx, ebx
jne 0x41d2f4
cmp byte [0x4486c0], al
je 0x41d24b
push 0x43cd08
push 0x4486c0
call fcn.004291c8
add esp, 8
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x41d2de
mov ebx, dword [ebp - 0x14]
push eax
push 1
push dword [ebp - 0x18]
push ebx
call fcn.0042ad99
add esp, 0x10
cmp eax, 1
jne 0x41d2c8
push 0x4486c0
push str.__The_Output_Efi_file__s_is_created_n
push edi
push esi
call fcn.0041d700
add esp, 0x10
push edi
push esi
push ebx
call fcn.0041c700
mov ebx, dword [ebp - 0x34]
jmp 0x41d279
mov ebx, dword [ebp - 0x14]
push edi
push esi
push ebx
call fcn.0041c700
mov ebx, dword [ebp - 0x34]
jmp 0x41d279
add eax, dword [ebp - 4]
push edi
add eax, dword [ebp + 8]
push esi
push eax
call fcn.0041c700
jmp 0x41d279
mov eax, dword [ebp - 4]
add eax, dword [ebp + 8]
push edi
push esi
push eax
call fcn.0041cb40
add esp, 0xc
test byte [ebx + 0x15], 0x80
jne 0x41d340
movzx ebx, word [ebx + 0x10]
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x1c]
shl ebx, 9
add eax, ebx
inc ecx
mov edx, 0xaa55
mov dword [ebp - 4], ebx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0xc], eax
cmp word [eax], dx
je 0x41ccc0
lea eax, [ecx - 1]
push eax
push ecx
push str.ERROR:_The_OpRom_Image__d_does_not_start_with_0x55AA._n_Check_if_Image__d_start_at_the_end_of_Image__d__n
push edi
push esi
call fcn.0041d700
add esp, 0x14
mov ebx, 2
jmp 0x41d343
push str.ERROR:_Failed_to_write_the_Uncompressed_Output_Efi_file_n
push edi
push esi
call fcn.0041d700
add esp, 0xc
mov ebx, 2
jmp 0x41d343
push 0x4486c0
push str.ERROR:_Failed_to_open_the_Output_Efi_file__a_n
push edi
push esi
call fcn.0041d700
add esp, 0x10
jmp 0x41d343
push str.ERROR:_EfiDecompress_Failed._n
push edi
push esi
call fcn.0041d700
add esp, 0xc
jmp 0x41d343
push str.ERROR:_UncompressedBuffer_Memory_allocation_failed_n
push edi
push esi
call fcn.0041d700
add esp, 0xc
mov ebx, 2
jmp 0x41d343
push str.ERROR:_Scratch_Buffer_allocation_failed_n
push edi
push esi
call fcn.0041d700
add esp, 0xc
mov ebx, 2
jmp 0x41d353
push str.ERROR:_UncompressedBuffer_EfiGetInfo_failed_n
push edi
push esi
call fcn.0041d700
add esp, 0xc
mov ebx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x41d353
push eax
call fcn.004297a9
add esp, 4
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x41d363
push eax
call fcn.004297a9
add esp, 4
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x41d373
push eax
call fcn.0042a44a
add esp, 4
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret