Function at 0x402c50
Capabilities:
Contain obfuscated stackstrings
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0xe0
cmp dword [ebp + 8], 3
jge 0x40331a
mov edi, ecx
lea esi, [esp + 0xc0]
lea eax, [esp + 0xa8]
mov dword [esp + 0xd0], 0x5bef58
mov dword [esp + 0xac], 0
mov dword [esp + 0xa8], 0
mov dword [esp + 0xb0], 0
mov dword [esp + 0xc4], 0
mov dword [esp + 0xc0], 0
mov dword [esp + 0xc8], 0
mov dword [esp + 0xd4], eax
mov dword [esp + 0xd8], esi
push 0x10
call fcn.004fc150
add esp, 4
mov dword [esp + 0x50], eax
mov dword [esp + 0x48], 0x11
mov dword [esp + 0x4c], 0xd
mov word [eax + 0xc], 0x76
mov dword [eax + 8], 0x2d207a74
mov dword [eax + 4], 0x726f7065
mov dword [eax], 0x72677562
lea edx, [esp + 0xd0]
lea ebx, [esp + 0x48]
mov dword [esp + 4], edi
mov ecx, edi
mov eax, dword [edi]
push edx
push 0
push ebx
call dword [eax]
test byte [esp + 0x48], 1
mov edi, eax
je 0x402d3a
push dword [esp + 0x50]
call fcn.004fc300
add esp, 4
lea eax, [esp + 0x14]
push esi
push eax
call fcn.004decc0
add esp, 8
lea ecx, [esp + 0xa8]
lea eax, [esp + 0x2c]
push ecx
push eax
call fcn.004decc0
add esp, 8
test edi, edi
je 0x402dff
mov eax, dword [0x5bc570]
test byte [eax], 1
jne 0x403253
push 2
call dword [0x58040c]
add esp, 4
cmp dword [ebp + 8], 1
jne 0x402df2
push str.Failed_to_get_bugreportz_version__which_is_only_available_on_devices_running_Android_7.0_or_later._nTrying_a_plain_text_bug_report_instead._n
push eax
call fcn.00438580
add esp, 8
mov ecx, dword [esp + 4]
mov dword [esp + 0x48], 0
mov dword [esp + 0x50], 0
mov dword [esp + 0x4c], 0
mov byte [esp + 0x48], 0x12
mov dword [esp + 0x4d], 0x726f7065
mov dword [esp + 0x49], 0x72677562
mov word [esp + 0x51], 0x74
mov edx, dword [0x5bc4cc]
mov eax, dword [ecx]
push edx
push 0
lea edx, [esp + 0x50]
push edx
call dword [eax]
test byte [esp + 0x48], 1
mov esi, eax
je 0x4031d2
push dword [esp + 0x50]
jmp 0x4031ca
test byte [esp + 0x2c], 1
je 0x402e15
mov ecx, dword [esp + 0x34]
jmp 0x402e19
movzx eax, byte [esp + 0x14]
test al, 1
je 0x402e42
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x402e4c
jmp 0x402d65
lea ecx, [esp + 0x2d]
push edi
push ecx
push str.Failed_to_get_bugreportz_version:_bugreportz__v_returned__s__code__d_._nIf_the_device_does_not_run_Android_7.0_or_above__try_adb_bugreport_instead._n
push eax
call fcn.00438580
add esp, 0x10
xor esi, esi
cmp edi, 1
sbb esi, esi
or esi, edi
test byte [esp + 0x2c], 1
je 0x4031d9
jmp 0x40320f
shr eax, 1
test eax, eax
je 0x402d65
cmp dword [ebp + 8], 1
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0x3c], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x40], 0
jne 0x402ebd
lea eax, [esp + 0x38]
push eax
call fcn.0041a350
add esp, 4
mov esi, dword [esp + 4]
test al, al
jne 0x402f84
push str.adb:_getcwd_failed
call sub.msvcrt.dll_perror
add esp, 4
mov esi, 1
test byte [esp + 0x38], 1
je 0x403194
jmp 0x4031b3
mov esi, dword [ebp + 0xc]
mov edi, dword [esi + 4]
mov dword [esp + 0x4c], 0
mov dword [esp + 0x48], 0
mov dword [esp + 0x50], 0
push edi
call sub.msvcrt.dll_strlen
add esp, 4
cmp eax, 0xfffffff0
jae 0x403324
mov ebx, eax
cmp eax, 0xb
mov dword [esp + 0xcc], edi
jae 0x402f0d
mov eax, ebx
lea edi, [esp + 0x49]
add al, bl
test ebx, ebx
mov byte [esp + 0x48], al
jne 0x402f32
jmp 0x402f43
mov esi, ebx
add esi, 0x10
and esi, 0xfffffff0
push esi
call fcn.004fc150
add esp, 4
or esi, 1
mov dword [esp + 0x50], eax
mov edi, eax
mov dword [esp + 0x48], esi
mov esi, dword [ebp + 0xc]
mov dword [esp + 0x4c], ebx
push ebx
push dword [esp + 0xd0]
push edi
call sub.msvcrt.dll_memcpy
add esp, 0xc
lea eax, [esp + 0x48]
mov byte [edi + ebx], 0
push eax
call fcn.0041a390
add esp, 4
test byte [esp + 0x48], 1
mov ebx, eax
je 0x402f69
push dword [esp + 0x50]
call fcn.004fc300
add esp, 4
mov eax, dword [esi + 4]
mov esi, dword [esp + 4]
test bl, bl
je 0x402f7a
lea ecx, [esp + 0x38]
jmp 0x402f7e
lea ecx, [esp + 8]
push eax
call fcn.00555b20
movzx eax, byte [esp + 8]
test al, 1
je 0x402fbb
mov eax, dword [esp + 0xc]
test eax, eax
je 0x402fc1
lea eax, [esp + 8]
push str..zip
push eax
call fcn.004defe0
add esp, 8
test al, al
jne 0x402fcf
lea ecx, [esp + 8]
push str..zip
call fcn.00555840
jmp 0x402fcf
shr eax, 1
test eax, eax
jne 0x402f95
lea ecx, [esp + 8]
push str.bugreport.zip
call fcn.00555b20
push 0x10
call fcn.004fc150
add esp, 4
mov dword [esp + 0xbc], eax
mov dword [eax + 8], 0x2d207a74
mov dword [eax + 4], 0x726f7065
mov dword [eax], 0x72677562
mov word [eax + 0xc], 0x70
movzx eax, byte [esp + 0x14]
mov dword [esp + 0xb4], 0x11
mov dword [esp + 0xb8], 0xd
test al, 1
je 0x40301f
mov eax, dword [esp + 0x18]
jmp 0x403021
shr eax, 1
mov bl, 1
cmp eax, 3
jne 0x40306c
lea ecx, [esp + 0x14]
push 3
push 0x581674
push 0xffffffffffffffff
push 0
call fcn.0053da20
test eax, eax
jne 0x40306c
push 2
call dword [0x58040c]
add esp, 4
push str.Bugreport_is_in_progress_and_it_could_take_minutes_to_complete._nPlease_be_patient_and_do_not_cancel_or_disconnect_your_device_until_it_completes._n
push eax
call fcn.00438580
add esp, 8
lea ecx, [esp + 0xb4]
push str.bugreportz
call fcn.00555b20
xor ebx, ebx
lea eax, [esp + 0x38]
mov dword [esp + 0x48], 0x5bef6c
mov dword [esp + 0x4c], esi
mov dword [esp + 0x58], 0
mov dword [esp + 0x54], 0
mov dword [esp + 0x50], 0
lea ecx, [esp + 0x5c]
push eax
call fcn.00556b50
lea eax, [esp + 8]
lea ecx, [esp + 0x68]
push eax
call fcn.00556b50
lea edi, [esp + 0x48]
lea eax, [esp + 0x20]
mov byte [esp + 0x20], 0x14
mov dword [esp + 0x78], 0
mov dword [esp + 0x74], 0
mov dword [esp + 0x80], 0
mov dword [esp + 0x7c], 0
mov dword [esp + 0x88], 0
mov dword [esp + 0x84], 0
mov byte [esp + 0x8c], bl
mov dword [esp + 0x94], 0
mov dword [esp + 0x90], 0
mov dword [esp + 0xa0], 0
mov dword [esp + 0x9c], 0
mov dword [esp + 0x98], 0
mov word [esp + 0x29], 0x676e
mov dword [esp + 0x25], 0x69746172
mov dword [esp + 0x21], 0x656e6567
mov byte [esp + 0x2b], 0
mov ecx, edi
push eax
call fcn.0053a960
test byte [esp + 0x20], 1
je 0x403167
push dword [esp + 0x28]
call fcn.004fc300
add esp, 4
mov ecx, dword [esp + 4]
lea edx, [esp + 0xb4]
mov eax, dword [ecx]
push edi
push 0
push edx
call dword [eax]
mov ecx, edi
mov esi, eax
call fcn.0053ae90
test byte [esp + 0xb4], 1
jne 0x40319d
test byte [esp + 0x38], 1
jne 0x4031b3
test byte [esp + 8], 1
jne 0x4031c6
jmp 0x4031d2
push dword [esp + 0xbc]
call fcn.004fc300
add esp, 4
test byte [esp + 0x38], 1
je 0x403194
push dword [esp + 0x40]
call fcn.004fc300
add esp, 4
test byte [esp + 8], 1
je 0x4031d2
push dword [esp + 0x10]
call fcn.004fc300
add esp, 4
test byte [esp + 0x2c], 1
jne 0x40320f
test byte [esp + 0x14], 1
jne 0x403222
test byte [esp + 0xc0], 1
jne 0x403238
test byte [esp + 0xa8], 1
je 0x403203
push dword [esp + 0xb0]
call fcn.004fc300
add esp, 4
mov eax, esi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret 8
push dword [esp + 0x34]
call fcn.004fc300
add esp, 4
test byte [esp + 0x14], 1
je 0x4031e0
push dword [esp + 0x1c]
call fcn.004fc300
add esp, 4
test byte [esp + 0xc0], 1
je 0x4031ea
push dword [esp + 0xc8]
call fcn.004fc300
add esp, 4
test byte [esp + 0xa8], 1
jne 0x4031f4
jmp 0x403203
call fcn.004ddb30
cmp eax, 1
jg 0x402d73
call dword [sym.imp.msvcrt.dll__errno]
mov esi, dword [eax]
lea ebx, [esp + 0x20]
mov ecx, ebx
push 0xffffffffffffffff
push 0
push 1
push 0
push 0xd3
push str.system_core_adb_client_bugreport.cpp
call fcn.004ddb50
mov ecx, ebx
call fcn.004ddb40
test byte [esp + 0x2c], 1
mov ebx, eax
je 0x4032a3
mov eax, dword [esp + 0x34]
test byte [esp + 0x14], 1
jne 0x4032ae
jmp 0x4032b4
lea eax, [esp + 0x2d]
test byte [esp + 0x14], 1
je 0x4032b4
mov ecx, dword [esp + 0x1c]
jmp 0x4032b8
lea ecx, [esp + 0x15]
push ecx
push eax
push edi
push str.bugreportz__v_results:_status_d__stdout_s__stderr_s
lea eax, [esp + 0x58]
push eax
call fcn.004deac0
add esp, 0x14
movzx eax, byte [esp + 0x48]
test al, 1
je 0x4032e0
mov ecx, dword [esp + 0x50]
mov eax, dword [esp + 0x4c]
jmp 0x4032e6
shr eax, 1
lea ecx, [esp + 0x49]
push eax
push ecx
push ebx
call fcn.0056cec0
add esp, 0xc
test byte [esp + 0x48], 1
je 0x403304
push dword [esp + 0x50]
call fcn.004fc300
add esp, 4
lea ecx, [esp + 0x20]
call fcn.004ddc40
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], esi
jmp 0x402d73
push str.usage:_adb_bugreport__PATH_
call fcn.0041b120
lea ecx, [esp + 0x48]
call fcn.0053ebb0
nop dword [eax]
push edi
push esi
sub esp, 0xc
mov esi, ecx
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
add esi, 4
test byte [ecx], 1
je 0x40334c
mov ecx, dword [ecx + 8]
jmp 0x40334d
inc ecx
mov edi, esp
push ecx
push eax
push str.__3d_____s
push edi
call fcn.004deac0
add esp, 0x10
mov ecx, esi
push 0
push edi
call fcn.00412e90
test byte [esp], 1
je 0x40337b
push dword [esp + 8]
call fcn.004fc300
add esp, 4
add esp, 0xc
pop esi
pop edi
ret 8