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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0xd0
xorps xmm0, xmm0
movlps qword [esp + 0x84], xmm0
mov dword [esp + 0x8c], 0
mov esi, dword [ecx]
push 0x20
call fcn.0040bb60
add esp, 4
movsd xmm0, qword [0x511030]
mov dword [esp + 8], eax
mov dword [eax + 0xc], 0x7478742e
mov dword [eax + 8], 0x6f666e69
mov dword [eax + 4], 0x2d64696f
mov dword [eax], 0x72646e61
mov byte [eax + 0x10], 0
lea edx, [esp + 0x84]
mov edi, esp
mov ecx, esi
movsd qword [esp], xmm0
mov eax, dword [esi]
push edx
push edi
call dword [eax]
test byte [esp], 1
mov ebx, eax
je 0x402706
push dword [esp + 8]
call fcn.0040bd10
add esp, 4
test bl, bl
je 0x4031f9
mov ecx, dword [esp + 0x84]
mov ebx, dword [esp + 0x88]
mov dword [esp + 0x70], 0
mov dword [esp + 0x6c], 0
mov dword [esp + 0x68], 0
sub ebx, ecx
cmp ebx, 0xfffffff0
jae 0x403203
cmp ebx, 0xb
jae 0x402756
mov eax, ebx
lea esi, [esp + 0x69]
add al, bl
test ebx, ebx
mov byte [esp + 0x68], al
jne 0x40277a
jmp 0x402785
lea edi, [ebx + 0x10]
and edi, 0xfffffff0
push edi
mov esi, ecx
call fcn.0040bb60
mov ecx, esi
add esp, 4
or edi, 1
mov dword [esp + 0x70], eax
mov esi, eax
mov dword [esp + 0x68], edi
mov dword [esp + 0x6c], ebx
push ebx
push ecx
push esi
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov ecx, dword [0x53c4d4]
mov dword [esp], 0
mov byte [esi + ebx], 0
mov dword [esp + 0x5c], 0
mov dword [esp + 0x58], 0
mov dword [esp + 0x60], 0
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov byte [esp], 0xe
mov dword [esp + 4], 0x74637564
mov dword [esp + 1], 0x646f7270
mov byte [esp + 8], 0
lea eax, [esp + 0x58]
push 0
push eax
lea eax, [esp + 8]
push eax
call fcn.00429d20
test byte [esp], 1
mov esi, eax
je 0x4027fc
push dword [esp + 8]
call fcn.0040bd10
add esp, 4
test esi, esi
je 0x40284b
push 2
call dword [0x53c24c]
add esp, 4
mov esi, eax
mov ecx, esp
push dword [0x53c4d4]
call fcn.0042bfa0
test byte [esp], 1
je 0x402826
mov eax, dword [esp + 8]
jmp 0x40282a
lea eax, [esp + 1]
push eax
push str.getvar:product_FAILED___s__n
push esi
call fcn.004cb190
add esp, 0xc
test byte [esp], 1
je 0x40284b
push dword [esp + 8]
call fcn.0040bd10
add esp, 4
mov edx, esp
mov dword [esp], 0
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov word [esp], 0xa02
mov byte [esp + 2], 0
lea eax, [esp + 0x68]
lea ecx, [esp + 0x90]
push edx
push eax
push ecx
call fcn.00428d00
add esp, 0xc
test byte [esp], 1
je 0x402897
push dword [esp + 8]
call fcn.0040bd10
add esp, 4
mov eax, dword [esp + 0x94]
mov esi, dword [esp + 0x90]
cmp esi, eax
mov dword [esp + 0xa4], eax
je 0x402fb3
mov edi, dword [fcn.004294f0]
lea eax, [esp + 1]
mov dword [esp + 0x78], eax
jmp 0x4028e0
test byte [esp + 0x4c], 1
je 0x402c29
push dword [esp + 0x54]
call fcn.0040bd10
add esp, 4
jmp 0x402c29
movzx eax, byte [esi]
test al, 1
jne 0x402900
shr eax, 1
test eax, eax
jne 0x40290b
jmp 0x402f9c
mov eax, dword [esi + 4]
test eax, eax
je 0x402f9c
xorpd xmm0, xmm0
lea eax, [esp + 0x34]
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x44], 0
mov dword [esp + 0x40], 0
mov dword [esp + 0x48], 0
movlpd qword [esp + 0x34], xmm0
mov dword [esp + 0x3c], 0
push eax
lea eax, [esp + 0x23]
push eax
lea eax, [esp + 0x48]
push eax
lea eax, [esp + 0x2c]
push eax
push esi
call fcn.004016e0
add esp, 0x14
test al, al
mov dword [esp + 0x80], esi
je 0x402990
movzx eax, byte [esp + 0x20]
test al, 1
je 0x4029a8
mov eax, dword [esp + 0x24]
cmp eax, 0x10
je 0x4029af
jmp 0x4029cb
push 2
call edi
add esp, 4
test byte [esi], 1
jne 0x402abf
lea ecx, [esi + 1]
jmp 0x402ac2
shr eax, 1
cmp eax, 0x10
jne 0x4029cb
lea ecx, [esp + 0x20]
push 0x10
push str.partition_exists
push 0xffffffffffffffff
push 0
call fcn.004cec10
test eax, eax
je 0x402b58
mov al, byte [esp + 0x1f]
mov byte [esp + 0x1e], al
lea eax, [esp + 0x20]
push eax
push str.Checking_
lea ebx, [esp + 0x54]
push ebx
call fcn.0050f9e0
add esp, 0xc
mov ecx, ebx
push 0x511ce4
call fcn.004e7c60
mov ecx, dword [eax + 8]
mov dword [esp + 8], ecx
movsd xmm0, qword [eax]
movsd qword [esp], xmm0
mov dword [eax + 8], 0
mov dword [eax + 4], 0
mov dword [eax], 0
push 2
call edi
add esp, 4
test byte [esp], 1
lea ecx, [esp + 1]
je 0x402a2f
mov ecx, dword [esp + 8]
push ecx
push str.__50s
push eax
call fcn.004cb190
add esp, 0xc
call fcn.00412d30
fstp qword [0x53c4d8]
test byte [esp], 1
je 0x402a5b
push dword [esp + 8]
call fcn.0040bd10
add esp, 4
test byte [esp + 0x4c], 1
je 0x402a6e
push dword [esp + 0x54]
call fcn.0040bd10
add esp, 4
call fcn.00412d30
fstp qword [esp + 0xc0]
movzx ecx, byte [esp + 0x40]
movsd xmm0, qword [esp + 0xc0]
mov eax, ecx
movsd qword [esp + 0xa8], xmm0
shr eax, 1
test cl, 1
mov edx, eax
je 0x402aa0
mov edx, dword [esp + 0x44]
test edx, edx
je 0x402d4d
movzx ebx, byte [esp + 0x58]
test bl, 1
je 0x402b0f
mov esi, dword [esp + 0x5c]
cmp edx, esi
je 0x402b1b
jmp 0x402cd5
mov ecx, dword [esi + 8]
push ecx
push str.android_info.txt_syntax_error:__s_n
push eax
call fcn.004cb190
add esp, 0xc
mov esi, dword [esp + 0x34]
test esi, esi
je 0x402f6f
mov eax, dword [esp + 0x38]
cmp eax, esi
je 0x402f60
nop dword [eax]
test byte [eax - 0xc], 1
lea ebx, [eax - 0xc]
je 0x402b04
push dword [eax - 4]
call fcn.0040bd10
add esp, 4
cmp esi, ebx
mov eax, ebx
jne 0x402af0
jmp 0x402f5a
mov esi, ebx
shr esi, 1
cmp edx, esi
jne 0x402cd5
test bl, 1
lea esi, [esp + 0x59]
je 0x402b28
mov esi, dword [esp + 0x60]
test cl, 1
jne 0x402cc3
xor ecx, ecx
nop word cs:[eax + eax]
nop dword [eax]
movzx edx, byte [esp + ecx + 0x41]
cmp dl, byte [esi + ecx]
jne 0x402cd5
inc ecx
cmp eax, ecx
jne 0x402b40
jmp 0x402d4d
mov eax, dword [esp + 0x34]
mov ebx, dword [0x53c4d4]
mov dword [esp + 4], 0
mov dword [esp], 0
mov dword [esp + 8], 0
mov dword [esp + 0x10], eax
push eax
push str.has_slot:
lea eax, [esp + 0x54]
mov esi, eax
push eax
call fcn.0050f9e0
add esp, 0xc
mov ecx, ebx
push 0
lea eax, [esp + 4]
push eax
push esi
call fcn.00429d20
test eax, eax
jne 0x4031af
movzx ecx, byte [esp]
mov edx, dword [esp + 4]
mov eax, ecx
mov esi, edx
shr eax, 1
and cl, 1
cmove esi, eax
cmp esi, 3
jne 0x402beb
mov ecx, esp
push 3
push 0x511b9e
push 0xffffffffffffffff
push 0
call fcn.004cec10
test eax, eax
je 0x4028c4
movzx eax, byte [esp]
mov edx, dword [esp + 4]
mov ecx, eax
shr eax, 1
and cl, 1
test cl, cl
mov bl, 1
cmovne eax, edx
cmp eax, 2
jne 0x402c0e
mov ecx, esp
push 2
push 0x511bad
push 0xffffffffffffffff
push 0
call fcn.004cec10
test eax, eax
setne bl
test byte [esp + 0x4c], 1
je 0x402c21
push dword [esp + 0x54]
call fcn.0040bd10
add esp, 4
test bl, bl
jne 0x4031c2
mov ebx, 0xfffffe68
mov dword [esp + 0x30], 0
nop word cs:[eax + eax]
mov esi, dword [ebx + 0x53c220]
test esi, esi
je 0x402c90
push esi
call sub.msvcrt.dll_strlen
add esp, 4
mov ecx, dword [esp + 0x10]
movzx edx, byte [ecx]
test dl, 1
je 0x402c70
mov edx, dword [ecx + 4]
cmp eax, edx
je 0x402c76
jmp 0x402c90
shr edx, 1
cmp eax, edx
jne 0x402c90
push eax
push esi
push 0xffffffffffffffff
push 0
call fcn.004cec10
test eax, eax
je 0x402c97
nop word cs:[eax + eax]
nop
add ebx, 0x18
jne 0x402c40
jmp 0x402ca9
mov al, 1
mov byte [ebx + 0x53c230], 0
mov dword [esp + 0x30], eax
add ebx, 0x18
jne 0x402c40
test byte [esp + 0x30], 1
je 0x4031ea
test byte [esp], 1
jne 0x402f15
jmp 0x402f21
push edx
push esi
push dword [esp + 0x50]
call sub.msvcrt.dll_memcmp
add esp, 0xc
test eax, eax
je 0x402d4d
call fcn.00412d30
fstp qword [esp + 0xb8]
movsd xmm0, qword [esp + 0xb8]
movsd qword [esp + 0x10], xmm0
push 2
call edi
add esp, 4
test byte [esp + 0x58], 1
lea ecx, [esp + 0x59]
je 0x402d06
mov ecx, dword [esp + 0x60]
test byte [esp + 0x40], 1
lea edx, [esp + 0x41]
je 0x402d15
mov edx, dword [esp + 0x48]
movsd xmm0, qword [esp + 0x10]
subsd xmm0, qword [esp + 0xa8]
sub esp, 0x18
movsd qword [esp + 0x10], xmm0
mov dword [esp + 0xc], edx
mov dword [esp + 8], ecx
mov dword [esp], eax
mov dword [esp + 4], str.IGNORE__product_is__s_required_only_for__s___7.3fs__n
call fcn.004cb190
add esp, 0x18
jmp 0x402f21
mov ecx, dword [0x53c4d4]
mov dword [esp + 4], 0
mov dword [esp], 0
mov dword [esp + 8], 0
push 0
lea eax, [esp + 4]
push eax
lea eax, [esp + 0x28]
push eax
call fcn.00429d20
test eax, eax
jne 0x40313d
mov eax, dword [esp + 0x38]
mov esi, dword [esp + 0x34]
cmp esi, eax
mov dword [esp + 0x9c], eax
je 0x402eb0
nop word [eax + eax]
movzx ecx, byte [esi]
movzx edx, byte [esp]
mov eax, ecx
mov dword [esp + 0x10], ecx
shr eax, 1
test cl, 1
mov ecx, dword [esi + 4]
mov dword [esp + 0xa0], eax
mov dword [esp + 0x7c], ecx
cmove ecx, eax
test dl, 1
je 0x402dd0
mov eax, dword [esp + 4]
jmp 0x402dd4
mov eax, edx
shr eax, 1
cmp ecx, eax
mov dword [esp + 0x30], ecx
jne 0x402e30
mov ebx, dword [esi + 8]
test dl, 1
lea ecx, [esi + 1]
lea edx, [esp + 1]
je 0x402def
mov edx, dword [esp + 8]
test byte [esp + 0x10], 1
mov eax, dword [esp + 0x30]
cmovne ecx, ebx
jne 0x402e60
mov cl, 1
test eax, eax
je 0x402eb6
mov ecx, dword [esp + 0x10]
xor eax, eax
shr ecx, 1
nop
movzx ebx, byte [esi + eax + 1]
cmp bl, byte [edx + eax]
jne 0x402e30
inc eax
cmp ecx, eax
jne 0x402e10
jmp 0x402eb4
test byte [esp + 0x10], 1
jne 0x402e50
mov eax, dword [esp + 0xa0]
lea ebx, [esi + 1]
cmp byte [ebx + eax - 1], 0x2a
je 0x402e89
jmp 0x402ea0
mov ebx, dword [esi + 8]
mov eax, dword [esp + 0x7c]
cmp byte [ebx + eax - 1], 0x2a
je 0x402e89
jmp 0x402ea0
mov dword [esp + 0x10], ecx
mov cl, 1
test eax, eax
je 0x402eb6
push eax
push edx
push dword [esp + 0x18]
call sub.msvcrt.dll_memcmp
mov cl, 1
add esp, 0xc
test eax, eax
mov eax, dword [esp + 0x7c]
je 0x402eb6
cmp byte [ebx + eax - 1], 0x2a
jne 0x402ea0
mov eax, dword [esp + 0x30]
mov ecx, esp
dec eax
push eax
push 0
push esi
push eax
push 0
call fcn.004cec90
test eax, eax
je 0x402eb4
add esi, 0xc
cmp esi, dword [esp + 0x9c]
jne 0x402da0
xor ecx, ecx
jmp 0x402eb6
mov cl, 1
mov bl, byte [esp + 0x1e]
cmp cl, bl
je 0x403050
call fcn.00412d30
fstp qword [esp + 0xb0]
movsd xmm0, qword [esp + 0xb0]
movsd qword [esp + 0x10], xmm0
push 2
call edi
add esp, 4
movsd xmm0, qword [esp + 0x10]
subsd xmm0, qword [esp + 0xa8]
sub esp, 0x10
movsd qword [esp + 8], xmm0
mov dword [esp], eax
mov dword [esp + 4], str.OKAY___7.3fs__n
call fcn.004cb190
add esp, 0x10
test byte [esp], 1
je 0x402f21
push dword [esp + 8]
call fcn.0040bd10
add esp, 4
mov esi, dword [esp + 0x34]
test esi, esi
je 0x402f6f
mov eax, dword [esp + 0x38]
cmp eax, esi
je 0x402f60
nop word cs:[eax + eax]
nop dword [eax + eax]
test byte [eax - 0xc], 1
lea ebx, [eax - 0xc]
je 0x402f54
push dword [eax - 4]
call fcn.0040bd10
add esp, 4
cmp esi, ebx
mov eax, ebx
jne 0x402f40
mov eax, dword [esp + 0x34]
jmp 0x402f62
mov eax, esi
mov dword [esp + 0x38], esi
push eax
call fcn.0040bd10
add esp, 4
test byte [esp + 0x40], 1
je 0x402f82
push dword [esp + 0x48]
call fcn.0040bd10
add esp, 4
test byte [esp + 0x20], 1
mov esi, dword [esp + 0x80]
je 0x402f9c
push dword [esp + 0x28]
call fcn.0040bd10
add esp, 4
add esi, 0xc
cmp esi, dword [esp + 0xa4]
jne 0x4028e0
mov esi, dword [esp + 0x90]
test esi, esi
je 0x403007
mov eax, dword [esp + 0x94]
cmp eax, esi
je 0x402ff5
mov edi, esi
nop word cs:[eax + eax]
nop
test byte [eax - 0xc], 1
lea esi, [eax - 0xc]
je 0x402fe4
push dword [eax - 4]
call fcn.0040bd10
add esp, 4
cmp edi, esi
mov eax, esi
jne 0x402fd0
mov eax, dword [esp + 0x90]
mov esi, edi
jmp 0x402ff7
mov eax, esi
mov dword [esp + 0x94], esi
push eax
call fcn.0040bd10
add esp, 4
test byte [esp + 0x58], 1
je 0x40301a
push dword [esp + 0x60]
call fcn.0040bd10
add esp, 4
test byte [esp + 0x68], 1
je 0x40302d
push dword [esp + 0x70]
call fcn.0040bd10
add esp, 4
mov eax, dword [esp + 0x84]
test eax, eax
je 0x403048
mov dword [esp + 0x88], eax
push eax
call fcn.0040bd10
add esp, 4
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
push 2
call edi
add esp, 4
push str.FAILED_n_n
push eax
call fcn.004cb190
add esp, 8
push 2
call edi
add esp, 4
test byte [esp + 0x20], 1
je 0x4030ba
mov ecx, dword [esp + 0x28]
test byte [esp], 1
je 0x403085
mov edx, dword [esp + 8]
mov dword [esp + 0x78], edx
push dword [esp + 0x78]
push ecx
push str.Device__s_is__s._n
push eax
call fcn.004cb190
add esp, 0x10
push 2
call edi
add esp, 4
test bl, bl
mov edx, str.requires
mov ecx, str.rejects
cmove ecx, edx
mov edx, dword [esp + 0x34]
test byte [edx], 1
jne 0x4030c6
inc edx
jmp 0x4030c9
lea ecx, [esp + 0x21]
test byte [esp], 1
je 0x403085
jmp 0x40307d
mov edx, dword [edx + 8]
push edx
push ecx
push str.Update__s__s
push eax
call fcn.004cb190
add esp, 0x10
mov esi, dword [esp + 0x34]
mov ebx, dword [esp + 0x38]
add esi, 0xc
push 2
call dword [0x53c24c]
jmp 0x40310a
push ecx
push str._or__s
push eax
call fcn.004cb190
add esp, 0xc
mov ebx, dword [esp + 0x38]
add esi, 0xc
push 2
call edi
add esp, 4
cmp esi, ebx
je 0x403125
test byte [esi], 1
jne 0x403120
lea ecx, [esi + 1]
jmp 0x4030f0
mov ecx, dword [esi + 8]
jmp 0x4030f0
push 0x511da7
push eax
call fcn.004cb190
add esp, 8
push str.requirements_not_met_
call fcn.00412d70
push 2
call edi
add esp, 4
push str.FAILED_n_n
push eax
call fcn.004cb190
add esp, 8
push 2
call edi
add esp, 4
test byte [esp + 0x20], 1
mov esi, eax
je 0x403168
mov ebx, dword [esp + 0x28]
jmp 0x40316c
lea ebx, [esp + 0x21]
lea edi, [esp + 0x4c]
mov ecx, edi
push dword [0x53c4d4]
call fcn.0042bfa0
test byte [esp + 0x4c], 1
je 0x40318a
mov eax, dword [esp + 0x54]
jmp 0x40318e
lea eax, [esp + 0x4d]
push eax
push ebx
push str.Could_not_getvar_for__s___s__n_n
push esi
call fcn.004cb190
add esp, 0x10
mov ecx, edi
call fcn.004e94e0
push str.requirements_not_met_
call fcn.00412d70
test byte [esp + 0x4c], 1
je 0x4031c2
push dword [esp + 0x54]
call fcn.0040bd10
add esp, 4
mov eax, dword [esp + 0x10]
test byte [eax], 1
jne 0x4031d1
inc dword [esp + 0x10]
jmp 0x4031dc
mov eax, dword [esp + 0x10]
mov eax, dword [eax + 8]
mov dword [esp + 0x10], eax
push dword [esp + 0x10]
push str.device_doesnt_have_required_partition__s_
call fcn.00412d70
mov eax, dword [esp + 0x10]
test byte [eax], 1
jne 0x40320c
inc dword [esp + 0x10]
jmp 0x403217
push str.could_not_read_android_info.txt
call fcn.00412d70
lea ecx, [esp + 0x68]
call fcn.004d1480
mov eax, dword [esp + 0x10]
mov eax, dword [eax + 8]
mov dword [esp + 0x10], eax
push dword [esp + 0x10]
push str.device_requires_partition__s_which_is_not_known_to_this_version_of_fastboot
call fcn.00412d70
nop word cs:[eax + eax]
nop