Function at 0x4113d0
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 0x411424
lea eax, [ebp - 0x1c]
mov dword [esp], eax
mov dword [esp + 8], esi
mov dword [esp + 4], str.device__s_not_found
call fcn.00421270
mov ecx, dword [ebp + 0x14]
lea eax, [ebp - 0x1c]
mov dword [esp], eax
call fcn.004a5af0
mov eax, dword [ebp - 0x1c]
lea ebx, [eax - 0xc]
sub esp, 4
cmp ebx, 0x4b0f44
jne 0x4117c7
mov dword [esp], 0x4f3098
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x4ac120]
sub esp, 4
cmp ebx, 0x4ac120
je 0x4117b2
xor edi, edi
cmp dword [ebx + 0x44], 5
je 0x411570
test esi, esi
je 0x4115a0
mov eax, dword [ebx + 0x58]
test eax, eax
je 0x411471
mov dword [esp + 4], eax
mov dword [esp], esi
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x4114a6
mov eax, dword [ebx + 0x68]
test eax, eax
je 0x411488
mov dword [esp + 4], eax
mov dword [esp], esi
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x4114a6
mov ecx, dword [ebx + 0x5c]
mov edx, 0x4b6428
mov eax, esi
mov dword [esp], 0
call fcn.0040ffc0
test eax, eax
je 0x4115b7
test edi, edi
jne 0x411525
mov edi, ebx
mov ebx, dword [ebx]
cmp ebx, 0x4ac120
jne 0x411448
mov dword [esp], 0x4f3098
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
test edi, edi
je 0x4114ff
mov eax, dword [edi + 0x44]
cmp eax, 7
je 0x4116bd
test eax, eax
jne 0x411680
mov ebx, dword [ebp + 0x14]
test ebx, ebx
je 0x4114ff
mov ecx, dword [ebp + 0x14]
mov dword [esp + 4], 0xe
mov dword [esp], str.device_offline
call fcn.004a60e0
sub esp, 8
cmp dword [ebp + 8], 0xffffffff
je 0x411563
mov eax, dword [ebp - 0x2c]
test eax, eax
jne 0x411794
mov dword [esp], 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
sub esp, 4
jmp 0x4113e3
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x411546
mov ecx, dword [ebp + 0x14]
mov dword [esp + 4], 0x14
mov dword [esp], str.more_than_one_device
call fcn.004a60e0
sub esp, 8
mov dword [esp], 0x4f3098
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [ebp - 0x2c], 1
sub esp, 4
cmp dword [ebp + 8], 0xffffffff
jne 0x411505
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 0x4114ac
mov ecx, dword [ebp + 0x14]
mov dword [esp + 4], 0x23
mov dword [esp], str.insufficient_permissions_for_device
call fcn.004a60e0
sub esp, 8
jmp 0x4114ac
mov eax, dword [ebp + 0xc]
test eax, eax
jne 0x4115f8
mov eax, dword [ebx + 0x4c]
test eax, eax
jne 0x4114ac
jmp 0x4114a6
mov ecx, dword [ebx + 0x60]
mov edx, 0x4b6431
mov eax, esi
mov dword [esp], 1
call fcn.0040ffc0
test eax, eax
jne 0x4114a6
mov ecx, dword [ebx + 0x64]
mov edx, 0x4b6438
mov eax, esi
mov dword [esp], 0
call fcn.0040ffc0
test eax, eax
jne 0x4114a6
jmp 0x4114ac
cmp dword [ebp + 0xc], 1
lea esi, [esi]
je 0x411640
cmp dword [ebp + 0xc], 2
jne 0x4114ac
test edi, edi
je 0x4114aa
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x411546
mov ecx, dword [ebp + 0x14]
mov dword [esp + 4], 0x1d
mov dword [esp], str.more_than_one_device_emulator
call fcn.004a60e0
sub esp, 8
jmp 0x411546
cmp dword [ebx + 0x4c], 1
jne 0x4114ac
test edi, edi
je 0x4114aa
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x411546
mov ecx, dword [ebp + 0x14]
mov dword [esp + 4], 0x16
mov dword [esp], str.more_than_one_emulator
call fcn.004a60e0
sub esp, 8
jmp 0x411546
cmp dword [ebp + 8], 0xffffffff
je 0x411765
cmp eax, dword [ebp + 8]
je 0x411765
mov ecx, dword [ebp + 0x14]
test ecx, ecx
je 0x4114ff
mov ecx, dword [ebp + 0x14]
mov dword [esp + 4], 0x14
mov dword [esp], str.invalid_device_state
call fcn.004a60e0
sub esp, 8
jmp 0x4114ff
mov edi, dword [ebp + 0x14]
test edi, edi
je 0x4114ff
mov ecx, dword [ebp + 0x14]
mov dword [esp + 4], 0x15
mov dword [esp], str.device_unauthorized._n
call fcn.004a60e0
sub esp, 8
mov dword [esp], 0x4b64a0
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.004a5d30
sub esp, 8
test ebx, ebx
je 0x4117a3
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.004a5d30
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.004a5d30
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.004a5d30
sub esp, 8
jmp 0x4114ff
mov edx, dword [ebp + 0x14]
test edx, edx
je 0x411565
mov ecx, dword [ebp + 0x14]
mov dword [esp + 4], 7
mov dword [esp], str.success
call fcn.004a60e0
mov eax, edi
sub esp, 8
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
test esi, esi
jne 0x411510
xor edi, edi
jmp 0x411565
mov eax, 7
mov ebx, str.not_set
jmp 0x41171a
mov dword [esp], 0x4f3098
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
jmp 0x4114ff
sub eax, 4
call fcn.004ab75c
test eax, eax
jg 0x411424
lea eax, [ebp - 0x1d]
mov ecx, ebx
mov dword [esp], eax
call fcn.004a5860
sub esp, 4
jmp 0x411424