Function at 0x40bdb0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x90
mov edi, edx
mov ebx, ecx
movzx ecx, byte [ecx]
mov eax, ecx
shr eax, 1
and cl, 1
mov edx, dword [ebx + 4]
mov esi, edx
cmove esi, eax
cmp esi, 4
mov dword [esp + 4], ebx
jne 0x40be05
mov ecx, ebx
push 4
push str.boot
push 0xffffffffffffffff
push 0
call fcn.0041f610
test eax, eax
je 0x40befb
movzx eax, byte [ebx]
mov edx, dword [ebx + 4]
mov ecx, eax
and cl, 1
shr eax, 1
test cl, cl
mov esi, edx
cmove esi, eax
cmp esi, 6
jne 0x40be38
mov ecx, ebx
push 6
push str.boot_a
push 0xffffffffffffffff
push 0
call fcn.0041f610
test eax, eax
je 0x40befb
movzx eax, byte [ebx]
mov edx, dword [ebx + 4]
mov ecx, eax
and cl, 1
shr eax, 1
test cl, cl
mov esi, edx
cmove esi, eax
cmp esi, 6
jne 0x40be6b
mov ecx, ebx
push 6
push str.boot_b
push 0xffffffffffffffff
push 0
call fcn.0041f610
test eax, eax
je 0x40befb
movzx eax, byte [ebx]
mov edx, dword [ebx + 4]
mov ecx, eax
and cl, 1
shr eax, 1
test cl, cl
mov esi, edx
cmove esi, eax
cmp esi, 9
jne 0x40be9a
mov ecx, ebx
push 9
push str.init_boot
push 0xffffffffffffffff
push 0
call fcn.0041f610
test eax, eax
je 0x40befb
movzx eax, byte [ebx]
mov edx, dword [ebx + 4]
mov ecx, eax
and cl, 1
shr eax, 1
test cl, cl
mov esi, edx
cmove esi, eax
cmp esi, 0xb
jne 0x40bec9
mov ecx, ebx
push 0xb
push str.init_boot_a
push 0xffffffffffffffff
push 0
call fcn.0041f610
test eax, eax
je 0x40befb
movzx eax, byte [ebx]
mov edx, dword [ebx + 4]
mov ecx, eax
and cl, 1
shr eax, 1
test cl, cl
cmovne eax, edx
cmp eax, 0xb
jne 0x40bee9
mov ecx, ebx
push 0xb
push str.init_boot_b
push 0xffffffffffffffff
push 0
call fcn.0041f610
test eax, eax
je 0x40befb
cmp byte [0x58654d], 0
je 0x40c1bb
jmp 0x40c1c8
mov eax, dword [edi + 0xc]
mov dword [esp + 0x24], edi
cmp dword [edi + 8], 0x40
sbb eax, 0
jl 0x40c1ae
mov ecx, dword [esp + 4]
call fcn.0040c810
mov ecx, edx
mov edx, dword [esp + 0x24]
mov edi, dword [edx + 8]
mov ebx, dword [edx + 0xc]
mov edx, ecx
xor edx, ebx
mov esi, eax
xor esi, edi
or esi, edx
je 0x40c1ae
cmp eax, edi
mov esi, ecx
sbb ecx, ebx
mov edi, eax
jge 0x40bf5b
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
mov ecx, dword [esp + 4]
test byte [ecx], 1
mov edx, dword [esp + 0x24]
je 0x40bfcd
mov ecx, dword [ecx + 8]
jmp 0x40bfd0
mov dword [esp + 0x34], edi
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 0x10], 0
mov ebx, dword [esp + 0x24]
mov eax, dword [ebx + 0x10]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x44]
lea ecx, [esp + 8]
push ecx
push eax
call fcn.00423690
add esp, 8
test al, al
je 0x40c663
mov edi, dword [ebx + 8]
add edi, 0xffffffc0
lea ecx, [esp + 8]
push 0x55db5a
push 4
push edi
call fcn.0041f690
test eax, eax
je 0x40bfee
push 0
push 0
push 0
push dword [ebx + 0x10]
call fcn.004695a0
add esp, 0x10
jmp 0x40c19b
add ecx, 1
push dword [edx + 0xc]
push dword [edx + 8]
push ecx
push esi
push edi
push ecx
push ecx
push str.Warning:_skip_copying__s_image_avb_footer___s_partition_size:__lld___s_image_size:__lld_._n
push eax
call fcn.0040de00
add esp, 0x24
jmp 0x40c1ae
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], esi
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x20], 0
mov eax, dword [esp + 4]
movzx edx, byte [eax]
lea ecx, [eax + 1]
test dl, 1
je 0x40c025
mov edx, dword [eax + 4]
mov esi, dword [eax + 8]
jmp 0x40c029
shr edx, 1
mov esi, ecx
lea eax, [edx + 0xa]
cmp eax, 0xfffffff0
jae 0x40c68c
cmp eax, 0xb
mov dword [esp + 0x28], ecx
jae 0x40c050
mov eax, edx
add al, dl
mov byte [esp + 0x18], al
lea edi, [esp + 0x19]
test edx, edx
jne 0x40c078
jmp 0x40c087
mov ebx, esi
lea esi, [edx + 0x1a]
and esi, 0xfffffff0
push esi
mov edi, edx
call fcn.0041a1e0
mov edx, edi
add esp, 4
mov edi, eax
mov dword [esp + 0x20], eax
or esi, 1
mov dword [esp + 0x18], esi
mov esi, ebx
mov dword [esp + 0x1c], edx
push edx
push esi
push edi
mov esi, edx
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
mov edx, esi
add esp, 0xc
mov byte [edi + edx], 0
lea ecx, [esp + 0x18]
push 0xa
push str._rewriting
call fcn.0041e090
call fcn.0040b220
mov edi, eax
mov ebx, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
call ebx
mov esi, dword [eax]
call ebx
mov dword [eax], esi
mov dword [esp + 0x58], edi
mov eax, dword [esp + 0x58]
push eax
lea esi, [esp + 0xc]
push esi
call fcn.00423810
add esp, 8
test al, al
je 0x40c695
mov eax, dword [esp + 0x34]
add eax, 0xffffffc0
mov ecx, dword [esp + 0x30]
adc ecx, 0xffffffff
push 0
push ecx
push eax
push edi
call fcn.004695a0
add esp, 0x10
lea ebx, [esp + 0x38]
mov ecx, ebx
push esi
push 0xffffffffffffffff
push dword [esp + 0x34]
push esi
call fcn.0041da40
mov dword [esp + 0x54], edi
mov eax, dword [esp + 0x54]
push eax
push ebx
call fcn.00423810
add esp, 8
mov ebx, eax
test byte [esp + 0x38], 1
je 0x40c123
push dword [esp + 0x40]
call fcn.0041a380
add esp, 4
test bl, bl
je 0x40c6b7
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov eax, dword [eax]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x24]
mov eax, dword [eax + 0x10]
cmp eax, 0xffffffff
je 0x40c14c
push eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll__close
add esp, 4
mov esi, dword [esp + 0x24]
mov dword [esi + 0x10], edi
mov ebx, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
call ebx
mov ecx, dword [esp + 0x2c]
mov dword [eax], ecx
mov eax, dword [esp + 0x34]
mov dword [esi + 8], eax
mov eax, dword [esp + 0x30]
mov dword [esi + 0xc], eax
push 0
push 0
push 0
push dword [esi + 0x10]
call fcn.004695a0
add esp, 0x10
call ebx
mov esi, dword [eax]
call ebx
mov dword [eax], esi
test byte [esp + 0x18], 1
je 0x40c19b
push dword [esp + 0x20]
call fcn.0041a380
add esp, 4
test byte [esp + 8], 1
je 0x40c1ae
push dword [esp + 0x10]
call fcn.0041a380
add esp, 4
mov edi, dword [esp + 0x24]
cmp byte [0x58654d], 0
jne 0x40c1c8
cmp byte [0x58654c], 1
jne 0x40c2ee
mov edx, dword [esp + 4]
movzx eax, byte [edx]
lea ebx, [edx + 1]
test al, 1
je 0x40c1de
mov ecx, dword [edx + 8]
mov eax, dword [edx + 4]
jmp 0x40c1e2
shr eax, 1
mov ecx, ebx
mov dword [esp + 0x88], eax
mov dword [esp + 0x84], ecx
mov dword [esp + 0x7c], str.vbmeta
mov dword [esp + 0x80], 6
sub esp, 0x10
movsd xmm0, qword [esp + 0x8c]
movsd qword [esp + 8], xmm0
movsd xmm0, qword [esp + 0x94]
movsd qword [esp], xmm0
call fcn.004624f0
add esp, 0x10
test al, al
jne 0x40c2e2
mov edx, dword [esp + 4]
movzx eax, byte [edx]
test al, 1
je 0x40c246
mov ecx, dword [edx + 8]
mov eax, dword [edx + 4]
jmp 0x40c24a
shr eax, 1
mov ecx, ebx
mov dword [esp + 0x78], eax
mov dword [esp + 0x74], ecx
mov dword [esp + 0x6c], str.vbmeta_a
mov dword [esp + 0x70], 8
sub esp, 0x10
movsd xmm0, qword [esp + 0x7c]
movsd qword [esp + 8], xmm0
movsd xmm0, qword [esp + 0x84]
movsd qword [esp], xmm0
call fcn.004624f0
add esp, 0x10
test al, al
jne 0x40c2e2
mov ecx, dword [esp + 4]
movzx eax, byte [ecx]
test al, 1
je 0x40c29e
mov ebx, dword [ecx + 8]
mov eax, dword [ecx + 4]
jmp 0x40c2a0
shr eax, 1
mov dword [esp + 0x68], eax
mov dword [esp + 0x64], ebx
mov dword [esp + 0x5c], str.vbmeta_b
mov dword [esp + 0x60], 8
sub esp, 0x10
movsd xmm0, qword [esp + 0x6c]
movsd qword [esp + 8], xmm0
movsd xmm0, qword [esp + 0x74]
movsd qword [esp], xmm0
call fcn.004624f0
add esp, 0x10
test al, al
je 0x40c415
xor ebx, ebx
movzx edx, bl
mov ecx, edi
call fcn.0040cad0
mov eax, dword [edi]
test eax, eax
je 0x40c388
cmp eax, 1
jne 0x40c658
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 0x10], 0
mov ebx, dword [edi + 4]
cmp dword [ebx], 0
je 0x40c3b2
lea esi, [esp + 0x18]
lea edi, [esp + 8]
jmp 0x40c342
mov ecx, edi
push esi
push ebx
call fcn.0040f0c0
cmp dword [ebx + 4], 0
lea ebx, [ebx + 4]
je 0x40c3a8
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
push 0
push 1
push dword [ebx]
call fcn.00469180
add esp, 0xc
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0xc]
cmp eax, dword [esp + 0x10]
jae 0x40c330
mov ecx, dword [ebx]
mov dword [eax], ecx
movsd xmm0, qword [esp + 0x18]
movsd qword [eax + 8], xmm0
add dword [esp + 0xc], 0x10
jmp 0x40c339
mov ecx, dword [0x586538]
mov eax, dword [edi + 0x10]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x50]
push dword [edi + 8]
push eax
push dword [esp + 0xc]
call fcn.00464510
jmp 0x40c40d
mov eax, dword [esp + 8]
mov edx, dword [esp + 0xc]
jmp 0x40c3b6
xor eax, eax
xor edx, edx
sub edx, eax
mov ebx, dword [esp + 4]
je 0x40c3fc
sar edx, 4
xor esi, esi
mov edi, 8
nop dword [eax + eax]
mov ecx, dword [0x586538]
add esi, 1
push edx
push esi
push dword [eax + edi]
push dword [eax + edi - 8]
push ebx
call fcn.004645f0
mov eax, dword [esp + 8]
mov edx, dword [esp + 0xc]
sub edx, eax
sar edx, 4
add edi, 0x10
cmp esi, edx
jb 0x40c3d0
test eax, eax
je 0x40c40d
mov dword [esp + 0xc], eax
push eax
call fcn.0041a380
add esp, 4
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 0x10], 0
mov ebx, dword [0x586538]
push 0x20
call fcn.0041a1e0
add esp, 4
mov dword [esp + 0x20], eax
mov dword [esp + 0x18], 0x21
mov dword [esp + 0x1c], 0x15
movsd xmm0, qword [0x55dc8e]
movsd qword [eax + 0xd], xmm0
movups xmm0, xmmword [str.partition_type:vbmeta]
movups xmmword [eax], xmm0
mov byte [eax + 0x15], 0
lea esi, [esp + 8]
lea eax, [esp + 0x18]
mov ecx, ebx
push 0
push esi
push eax
call fcn.00463ce0
test eax, eax
je 0x40c55e
mov ebx, dword [0x586538]
push 0x20
call fcn.0041a1e0
add esp, 4
mov dword [esp + 0x40], eax
mov dword [esp + 0x38], 0x21
mov dword [esp + 0x3c], 0x17
movsd xmm0, qword [0x55dca6]
movsd qword [eax + 0xf], xmm0
movups xmm0, xmmword [str.partition_type:vbmeta_a]
movups xmmword [eax], xmm0
mov byte [eax + 0x17], 0
lea eax, [esp + 0x38]
mov ecx, ebx
push 0
push esi
push eax
call fcn.00463ce0
test eax, eax
je 0x40c60f
mov ebx, dword [0x586538]
push 0x20
call fcn.0041a1e0
add esp, 4
mov dword [esp + 0x4c], eax
mov dword [esp + 0x44], 0x21
mov dword [esp + 0x48], 0x17
movsd xmm0, qword [0x55dcbe]
movsd qword [eax + 0xf], xmm0
movups xmm0, xmmword [str.partition_type:vbmeta_b]
movups xmmword [eax], xmm0
mov byte [eax + 0x17], 0
lea eax, [esp + 0x44]
mov ecx, ebx
push 0
push esi
push eax
call fcn.00463ce0
test eax, eax
sete bl
test byte [esp + 0x44], 1
jne 0x40c638
test byte [esp + 0x38], 1
jne 0x40c61c
test byte [esp + 0x18], 1
jne 0x40c567
test byte [esp + 8], 1
jne 0x40c57a
test bl, bl
jne 0x40c2ee
jmp 0x40c58e
mov bl, 1
test byte [esp + 0x18], 1
je 0x40c54d
push dword [esp + 0x20]
call fcn.0041a380
add esp, 4
test byte [esp + 8], 1
je 0x40c554
push dword [esp + 0x10]
call fcn.0041a380
add esp, 4
test bl, bl
jne 0x40c2ee
mov ebx, dword [esp + 4]
movzx ecx, byte [ebx]
mov eax, ecx
shr eax, 1
and cl, 1
mov edx, dword [ebx + 4]
mov esi, edx
cmove esi, eax
cmp esi, 4
jne 0x40c5d0
mov ecx, ebx
push 4
push str.boot
push 0xffffffffffffffff
push 0
call fcn.0041f610
test eax, eax
je 0x40c651
movzx eax, byte [ebx]
mov edx, dword [ebx + 4]
mov ecx, eax
and cl, 1
shr eax, 1
test cl, cl
cmovne eax, edx
cmp eax, 6
jne 0x40c5f0
mov ecx, ebx
push 6
push str.boot_a
push 0xffffffffffffffff
push 0
call fcn.0041f610
test eax, eax
je 0x40c651
mov eax, ebx
mov bl, 1
push str.boot_b
push eax
call fcn.0040dcc0
add esp, 8
test al, al
jne 0x40c2e4
jmp 0x40c2ee
mov bl, 1
test byte [esp + 0x38], 1
je 0x40c546
push dword [esp + 0x40]
call fcn.0041a380
add esp, 4
test byte [esp + 0x18], 1
je 0x40c54d
jmp 0x40c567
push dword [esp + 0x4c]
call fcn.0041a380
add esp, 4
test byte [esp + 0x38], 1
je 0x40c546
jmp 0x40c61c
mov bl, 1
jmp 0x40c2e4
push eax
push str.unknown_buffer_type:__d
call fcn.00424010
mov eax, dword [esp + 4]
test byte [eax], 1
je 0x40c679
mov eax, dword [esp + 4]
mov eax, dword [eax + 8]
mov dword [esp + 4], eax
jmp 0x40c67e
add dword [esp + 4], 1
push dword [esp + 4]
push str.Failed_reading_from__s
call fcn.00424010
lea ecx, [esp + 0x18]
call fcn.0041d590
mov eax, dword [esp + 4]
test byte [eax], 1
je 0x40c6a9
mov eax, dword [esp + 4]
mov eax, dword [eax + 8]
mov dword [esp + 0x28], eax
push dword [esp + 0x28]
push str.Failed_writing_to_modified__s
call fcn.00424010
mov eax, dword [esp + 4]
test byte [eax], 1
je 0x40c6cb
mov eax, dword [esp + 4]
mov eax, dword [eax + 8]
mov dword [esp + 0x28], eax
push dword [esp + 0x28]
push str.Failed_copying_AVB_footer_in__s
call fcn.00424010
nop dword [eax]