Function at 0x410270
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x2c
mov esi, dword [ebp + 0x10]
mov dword [ebp - 0x2c], 0
mov edx, dword [ebp + 0x14]
test edx, edx
je 0x4102c4
lea eax, [ebp - 0x1c]
mov dword [esp], eax
mov dword [esp + 8], esi
mov dword [esp + 4], str.device__s_not_found
call fcn.0041f9c0
mov ecx, dword [ebp + 0x14]
lea eax, [ebp - 0x1c]
mov dword [esp], eax
call fcn.004a0de0
mov eax, dword [ebp - 0x1c]
lea ebx, [eax - 0xc]
sub esp, 4
cmp ebx, 0x4abf34
jne 0x410667
mov dword [esp], 0x4ee098
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x4a7120]
sub esp, 4
cmp ebx, 0x4a7120
je 0x410652
xor edi, edi
cmp dword [ebx + 0x44], 5
je 0x410410
test esi, esi
je 0x410440
mov eax, dword [ebx + 0x58]
test eax, eax
je 0x410311
mov dword [esp + 4], eax
mov dword [esp], esi
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x410346
mov eax, dword [ebx + 0x68]
test eax, eax
je 0x410328
mov dword [esp + 4], eax
mov dword [esp], esi
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x410346
mov ecx, dword [ebx + 0x5c]
mov edx, 0x4b12e8
mov eax, esi
mov dword [esp], 0
call fcn.0040ee60
test eax, eax
je 0x410457
test edi, edi
jne 0x4103c5
mov edi, ebx
mov ebx, dword [ebx]
cmp ebx, 0x4a7120
jne 0x4102e8
mov dword [esp], 0x4ee098
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
test edi, edi
je 0x41039f
mov eax, dword [edi + 0x44]
cmp eax, 7
je 0x41055d
test eax, eax
jne 0x410520
mov ebx, dword [ebp + 0x14]
test ebx, ebx
je 0x41039f
mov ecx, dword [ebp + 0x14]
mov dword [esp + 4], 0xe
mov dword [esp], str.device_offline
call fcn.004a13d0
sub esp, 8
cmp dword [ebp + 8], 0xffffffff
je 0x410403
mov eax, dword [ebp - 0x2c]
test eax, eax
jne 0x410634
mov dword [esp], 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
sub esp, 4
jmp 0x410283
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x4103e6
mov ecx, dword [ebp + 0x14]
mov dword [esp + 4], 0x14
mov dword [esp], str.more_than_one_device
call fcn.004a13d0
sub esp, 8
mov dword [esp], 0x4ee098
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [ebp - 0x2c], 1
sub esp, 4
cmp dword [ebp + 8], 0xffffffff
jne 0x4103a5
xor edi, edi
lea esp, [ebp - 0xc]
mov eax, edi
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x41034c
mov ecx, dword [ebp + 0x14]
mov dword [esp + 4], 0x23
mov dword [esp], str.insufficient_permissions_for_device
call fcn.004a13d0
sub esp, 8
jmp 0x41034c
mov eax, dword [ebp + 0xc]
test eax, eax
jne 0x410498
mov eax, dword [ebx + 0x4c]
test eax, eax
jne 0x41034c
jmp 0x410346
mov ecx, dword [ebx + 0x60]
mov edx, 0x4b12f1
mov eax, esi
mov dword [esp], 1
call fcn.0040ee60
test eax, eax
jne 0x410346
mov ecx, dword [ebx + 0x64]
mov edx, 0x4b12f8
mov eax, esi
mov dword [esp], 0
call fcn.0040ee60
test eax, eax
jne 0x410346
jmp 0x41034c
cmp dword [ebp + 0xc], 1
lea esi, [esi]
je 0x4104e0
cmp dword [ebp + 0xc], 2
jne 0x41034c
test edi, edi
je 0x41034a
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x4103e6
mov ecx, dword [ebp + 0x14]
mov dword [esp + 4], 0x1d
mov dword [esp], str.more_than_one_device_emulator
call fcn.004a13d0
sub esp, 8
jmp 0x4103e6
cmp dword [ebx + 0x4c], 1
jne 0x41034c
test edi, edi
je 0x41034a
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x4103e6
mov ecx, dword [ebp + 0x14]
mov dword [esp + 4], 0x16
mov dword [esp], str.more_than_one_emulator
call fcn.004a13d0
sub esp, 8
jmp 0x4103e6
cmp dword [ebp + 8], 0xffffffff
je 0x410605
cmp eax, dword [ebp + 8]
je 0x410605
mov ecx, dword [ebp + 0x14]
test ecx, ecx
je 0x41039f
mov ecx, dword [ebp + 0x14]
mov dword [esp + 4], 0x14
mov dword [esp], str.invalid_device_state
call fcn.004a13d0
sub esp, 8
jmp 0x41039f
mov edi, dword [ebp + 0x14]
test edi, edi
je 0x41039f
mov ecx, dword [ebp + 0x14]
mov dword [esp + 4], 0x15
mov dword [esp], str.device_unauthorized._n
call fcn.004a13d0
sub esp, 8
mov dword [esp], 0x4b1360
call sub.msvcrt.dll_getenv
mov ecx, dword [ebp + 0x14]
mov dword [esp + 4], 0x20
mov dword [esp], str.This_adbds__ADB_VENDOR_KEYS_is
mov ebx, eax
call fcn.004a1020
sub esp, 8
test ebx, ebx
je 0x410643
mov dword [esp], ebx
call sub.msvcrt.dll_strlen
mov ecx, dword [ebp + 0x14]
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.004a1020
mov ecx, dword [ebp + 0x14]
sub esp, 8
mov dword [esp + 4], 0x2d
mov dword [esp], str.__try_adb_kill_server_if_that_seems_wrong._n
call fcn.004a1020
mov ecx, dword [ebp + 0x14]
sub esp, 8
mov dword [esp + 4], 0x39
mov dword [esp], str.Otherwise_check_for_a_confirmation_dialog_on_your_device.
call fcn.004a1020
sub esp, 8
jmp 0x41039f
mov edx, dword [ebp + 0x14]
test edx, edx
je 0x410405
mov ecx, dword [ebp + 0x14]
mov dword [esp + 4], 7
mov dword [esp], str.success
call fcn.004a13d0
mov eax, edi
sub esp, 8
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
test esi, esi
jne 0x4103b0
xor edi, edi
jmp 0x410405
mov eax, 7
mov ebx, str.not_set
jmp 0x4105ba
mov dword [esp], 0x4ee098
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
jmp 0x41039f
sub eax, 4
call fcn.004a6570
test eax, eax
jg 0x4102c4
lea eax, [ebp - 0x1d]
mov ecx, ebx
mov dword [esp], eax
call fcn.004a0b50
sub esp, 4
jmp 0x4102c4