joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401830
Capabilities:
Create pipe
Create process on windows
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x18c
lea eax, [ebp - 0x28]
mov dword [ebp - 0x28], 0xc
mov dword [ebp - 0x24], 0
push 0
push eax
lea eax, [ebp - 0x18]
mov dword [ebp - 0x20], 1
push eax
lea eax, [ebp - 0x14]
push eax
call sub.KERNEL32.dll_CreatePipe
test eax, eax
je 0x4019d0
mov ecx, dword [ebp - 0x14]
push ebx
push 0
push 1
push ecx
call sub.KERNEL32.dll_SetHandleInformation
push edx
push edx
push 0xfffffffffffffff5
call sub.KERNEL32.dll_GetStdHandle
mov ebx, eax
push 0xfffffffffffffff4
call sub.KERNEL32.dll_GetStdHandle
add esp, 0xc
mov esi, eax
cmp ebx, 0xffffffff
je 0x4018a2
push eax
push 0
push 1
push ebx
call sub.KERNEL32.dll_SetHandleInformation
pop eax
cmp esi, 0xffffffff
je 0x4018b3
push eax
push 0
push 1
push esi
call sub.KERNEL32.dll_SetHandleInformation
pop eax
lea edi, [ebp - 0x7c]
push eax
push 0x44
push 0
push edi
call sub.msvcrt.dll_memset
mov dword [ebp - 0x7c], 0x44
mov dword [esp], 0xfffffff6
call sub.KERNEL32.dll_GetStdHandle
lea ebx, [ebp - 0x180]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x40], eax
push 0xfffffffffffffff4
call sub.KERNEL32.dll_GetStdHandle
mov dword [ebp - 0x50], 0x100
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
push eax
mov dword [ebp - 0x30], 0
push eax
mov dword [ebp - 0x2c], 0
push 0x104
push ebx
push 0
call sub.KERNEL32.dll_GetModuleFileNameA
lea esi, [ebp - 0x38]
add esp, 0xc
push esi
push edi
push 0
push 0
push 8
push 1
push 0
push 0
push str.adb_fork_server_server
push ebx
call sub.KERNEL32.dll_CreateProcessA
mov ecx, dword [ebp - 0x18]
mov ebx, eax
push esi
push ecx
call sub.KERNEL32.dll_CloseHandle
add esp, 0xc
test ebx, ebx
je 0x4019de
sub esp, 0xc
mov edi, dword [ebp - 0x38]
push edi
call sub.KERNEL32.dll_CloseHandle
mov esi, dword [ebp - 0x34]
push esi
call sub.KERNEL32.dll_CloseHandle
lea eax, [ebp - 0x1c]
mov ebx, dword [ebp - 0x14]
push 0
push eax
lea eax, [ebp - 0xf]
push 3
push eax
push ebx
call sub.KERNEL32.dll_ReadFile
mov ecx, dword [ebp - 0x14]
mov ebx, eax
push ecx
call sub.KERNEL32.dll_CloseHandle
add esp, 0xc
test ebx, ebx
je 0x401a0a
cmp dword [ebp - 0x1c], 3
jne 0x40199d
cmp byte [ebp - 0xf], 0x4f
je 0x4019c0
push eax
push eax
push str.ADB_server_didnt_ACK_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
call fcn.004013a0
or eax, 0xffffffff
add esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
cmp byte [ebp - 0xe], 0x4b
jne 0x40199d
xor eax, eax
cmp byte [ebp - 0xd], 0xa
jne 0x40199d
jmp 0x4019b8
call sub.KERNEL32.dll_GetLastError
push esi
push eax
push str.CreatePipe___failure__error__ld_n
jmp 0x4019a4
call sub.KERNEL32.dll_GetLastError
push edx
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
push str.CreateProcess_failure__error__ld_n
add eax, 0x40
push eax
call fcn.004013a0
pop eax
mov eax, dword [ebp - 0x14]
push eax
call sub.KERNEL32.dll_CloseHandle
or eax, 0xffffffff
add esp, 0xc
jmp 0x4019b8
call sub.KERNEL32.dll_GetLastError
push edx
push eax
push str.could_not_read_ok_from_ADB_Server__error___ld_n
jmp 0x4019a4
Function at 0x401a20
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x134
lea eax, [ebp - 0x110]
push eax
push 0xfc
call sub.KERNEL32.dll_GetTempPathA
lea ecx, [ebp - 0x110]
mov eax, dword [ecx]
add ecx, 4
lea edx, [eax - 0x1010101]
xor eax, 0xffffffff
and edx, eax
and edx, 0x80808080
je 0x401a43
test edx, 0x8080
je 0x401b20
add dl, dl
mov eax, ecx
sbb eax, 3
mov dword [eax], 0x2e626461
mov dword [eax + 4], 0x676f6c
push 0x49e14b
push 0x49e14e
call sub.msvcrt.dll_fopen
add esp, 0x10
mov dword [ebp - 0x120], eax
test eax, eax
je 0x401b3e
mov ebx, dword [sym.imp.msvcrt.dll__iob]
mov ecx, 8
cld
mov edi, ebx
mov esi, eax
rep movsd dword es:[edi], dword [esi]
lea edi, [ebp - 0x110]
push eax
push eax
push 0x49e152
push edi
call sub.msvcrt.dll_fopen
add esp, 0x10
mov dword [ebp - 0x138], eax
test eax, eax
je 0x401b30
mov edi, dword [ebp - 0x138]
push 0
push 4
push 0
push edi
call sub.msvcrt.dll_setvbuf
cld
mov eax, 8
mov esi, dword [ebp - 0x138]
lea edi, [ebx + 0x20]
mov ecx, eax
rep movsd dword es:[edi], dword [esi]
add ebx, 0x40
mov esi, dword [ebp - 0x138]
mov edi, ebx
mov ecx, eax
rep movsd dword es:[edi], dword [esi]
call sub.msvcrt.dll__getpid
add esp, 0xc
push eax
push str.____adb_starting__pid__d______n
push ebx
call fcn.004013a0
add esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
shr edx, 0x10
add ecx, 2
jmp 0x401a67
mov eax, dword [ebp - 0x120]
mov dword [ebp - 0x138], eax
jmp 0x401acd
mov ebx, dword [sym.imp.msvcrt.dll__iob]
jmp 0x401aad

Function at 0x402550
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x28
push str.ADB_TRACE
call sub.msvcrt.dll_getenv
add esp, 0x10
mov dword [ebp - 0x14], eax
test eax, eax
je 0x40260c
mov al, byte [eax]
test al, al
je 0x40260c
push eax
push eax
push str.__:_
mov eax, dword [ebp - 0x14]
push eax
call sub.msvcrt.dll_strpbrk
add esp, 0x10
mov dword [ebp - 0x10], eax
test eax, eax
je 0x402623
mov edi, dword [ebp - 0x10]
mov ebx, dword [ebp - 0x14]
sub edi, ebx
mov ecx, dword [0x49e7a0]
mov dword [ebp - 0x20], edi
test ecx, ecx
je 0x402604
mov esi, dword [0x49e7a0]
xor ebx, ebx
jmp 0x4025c4
inc ebx
mov esi, dword [ebx*8 + 0x49e7a0]
test esi, esi
je 0x402604
sub esp, 0xc
push esi
call sub.msvcrt.dll_strlen
add esp, 0x10
cmp dword [ebp - 0x20], eax
jne 0x4025b8
mov eax, dword [ebp - 0x20]
mov edi, dword [ebp - 0x14]
cld
cmp eax, eax
mov ecx, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x4025b8
mov ecx, dword [ebx*8 + 0x49e7a4]
test ecx, ecx
je 0x40263f
mov eax, 1
mov edx, dword [0x4ddfd8]
shl eax, cl
or edx, eax
mov dword [0x4ddfd8], edx
mov eax, dword [ebp - 0x10]
cmp byte [eax], 0
jne 0x402614
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
inc eax
mov edx, dword [ebp - 0x10]
mov dword [ebp - 0x14], eax
mov al, byte [edx + 1]
jmp 0x402573
sub esp, 0xc
mov edi, dword [ebp - 0x14]
push edi
call sub.msvcrt.dll_strlen
mov esi, dword [ebp - 0x14]
add esp, 0x10
add eax, esi
mov dword [ebp - 0x10], eax
jmp 0x402599
mov dword [0x4ddfd8], 0xffffffff
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x4039d0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
sub esp, 0x3c
push 0x401450
call section..text
pop eax
pop edx
push 1
push 0x401460
call sub.KERNEL32.dll_SetConsoleCtrlHandler
pop esi
pop eax
call fcn.00404b70
mov dword [0x4c9008], 1
call fcn.00412ee0
call fcn.00412280
sub esp, 0xc
push 0x15b3
call fcn.00406f10
call fcn.0040cf70
add esp, 0xc
mov ebx, dword [ebp + 0xc]
push ebx
lea ebx, [ebp - 0x2a]
push 0x1e
push ebx
call fcn.004014c0
xor ecx, ecx
mov edx, str.smartsocket
mov eax, ebx
mov dword [esp], 0
call fcn.00401bd0
add esp, 0x10
test eax, eax
jne 0x403b0a
mov ecx, dword [ebp + 8]
test ecx, ecx
jne 0x403ae0
test byte [0x4ddfd8], 1
je 0x403aca
call sub.msvcrt.dll__errno
sub esp, 0xc
mov esi, dword [eax]
push 0x4ddfe8
call sub.KERNEL32.dll_EnterCriticalSection
mov ebx, dword [sym.imp.msvcrt.dll__iob]
add esp, 0xc
add ebx, 0x40
push str.adb_main
push str.system_core_adb_adb.c
push 0x49e056
push ebx
call fcn.004013a0
call sub.msvcrt.dll__errno
mov dword [eax], esi
pop eax
pop edx
push str.Event_loop_starting_n
push ebx
call fcn.004013a0
mov dword [esp], ebx
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4ddfe8
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
call sub.msvcrt.dll__errno
mov dword [eax], esi
call fcn.00413500
call fcn.00411f60
lea esp, [ebp - 8]
xor eax, eax
pop ebx
pop esi
pop ebp
ret
sub esp, 0xc
push 0xfffffffffffffff5
call sub.KERNEL32.dll_GetStdHandle
lea edx, [ebp - 0xc]
push 0
push edx
push 3
push 0x49e684
push eax
call sub.KERNEL32.dll_WriteFile
add esp, 0xc
call fcn.00401a20
jmp 0x403a5a
sub esp, 0xc
push 1
call sub.msvcrt.dll_exit
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
Function at 0x406ce0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x58
push str.ADBHOST
call sub.msvcrt.dll_getenv
add esp, 0x10
test eax, eax
je 0x406dd0
mov edx, dword [ebp + 0xc]
push ecx
push 1
push edx
push eax
call fcn.00416210
add esp, 0x10
mov edi, eax
test eax, eax
js 0x406dd0
test byte [0x4ddfd8], 8
jne 0x406d61
sub esp, 0xc
lea ebx, [ebp - 0x4c]
push edi
call fcn.00415160
pop eax
mov eax, dword [ebp + 8]
push eax
push 0x49f4be
push str._s_d
push 0x40
push ebx
call fcn.004963f0
add esp, 0x20
mov eax, dword [ebp + 0xc]
push 1
push eax
push ebx
push edi
call fcn.00404f60
xor eax, eax
add esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
call sub.msvcrt.dll__errno
sub esp, 0xc
mov esi, dword [eax]
push 0x4ddfe8
call sub.KERNEL32.dll_EnterCriticalSection
mov ebx, dword [sym.imp.msvcrt.dll__iob]
add esp, 0xc
add ebx, 0x40
push str.local_connect_arbitrary_ports
push str.system_core_adb_transport_local.c
push 0x49f48e
push ebx
call fcn.00406ca0
call sub.msvcrt.dll__errno
add esp, 0xc
mov dword [eax], esi
push edi
push 0x49f498
push ebx
call fcn.00406ca0
mov dword [esp], ebx
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4ddfe8
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
call sub.msvcrt.dll__errno
mov dword [eax], esi
jmp 0x406d21
push eax
push eax
mov eax, dword [ebp + 0xc]
push 1
push eax
call fcn.004165d0
mov edi, eax
add esp, 0x10
or eax, 0xffffffff
test edi, edi
jns 0x406d18
jmp 0x406d59

Function at 0x406f10
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xc
mov esi, 0x407280
mov ebx, dword [0x4c9008]
test ebx, ebx
jne 0x406f2d
mov esi, 0x407010
test byte [0x4ddfd8], 8
jne 0x406f80
push edi
mov ebx, dword [ebp + 8]
push ebx
push 0
push esi
call sub.msvcrt.dll__beginthread
add esp, 0x10
inc eax
je 0x406f51
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [0x4c9008]
mov eax, 0x49f4cd
test ecx, ecx
jne 0x406f65
mov eax, 0x49f4d4
push edx
push edx
push eax
push str.cannot_create_local_socket__s_thread
call fcn.00402660
add esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
call sub.msvcrt.dll__errno
sub esp, 0xc
mov edi, dword [eax]
push 0x4ddfe8
call sub.KERNEL32.dll_EnterCriticalSection
mov ebx, dword [sym.imp.msvcrt.dll__iob]
add esp, 0xc
add ebx, 0x40
push str.local_init
push str.system_core_adb_transport_local.c
push 0x49f48e
push ebx
call fcn.00406ca0
call sub.msvcrt.dll__errno
add esp, 0x10
mov dword [eax], edi
mov eax, 0x49f4cd
mov ecx, dword [0x4c9008]
test ecx, ecx
jne 0x406fd3
mov eax, 0x49f4d4
push edx
push eax
push str.transport:_local__s_init_n
push ebx
call fcn.00406ca0
mov dword [esp], ebx
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4ddfe8
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
call sub.msvcrt.dll__errno
mov dword [eax], edi
jmp 0x406f36
Function at 0x407f20
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
push eax
mov eax, 0x1008
call fcn.00495ce0
mov eax, dword [ebp - 0x10]
mov esi, eax
test eax, eax
js 0x4080ba
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [ebp - 0x1014], eax
lea esi, [esi]
test byte [0x4ddfd8], 1
jne 0x407fc1
lea esi, [esi]
lea edx, [ebp - 0x100c]
push eax
push 0x1000
push edx
push esi
call fcn.00414330
add esp, 0x10
mov edi, eax
test byte [0x4ddfd8], 1
jne 0x408037
cmp edi, 0
je 0x4080ba
jl 0x4080c2
mov ebx, dword [sym.imp.msvcrt.dll__iob]
lea eax, [ebp - 0x100c]
add ebx, 0x20
push ebx
push edi
push 1
push eax
call sub.msvcrt.dll_fwrite
mov dword [esp], ebx
call sub.msvcrt.dll_fflush
add esp, 0x10
test byte [0x4ddfd8], 1
je 0x407f60
call sub.msvcrt.dll__errno
sub esp, 0xc
mov ebx, dword [eax]
push 0x4ddfe8
call sub.KERNEL32.dll_EnterCriticalSection
add esp, 0xc
push str.read_and_dump
push str.system_core_adb_commandline.c
push 0x4a19f8
mov eax, dword [ebp - 0x1014]
push eax
call fcn.00407d40
call sub.msvcrt.dll__errno
add esp, 0xc
mov dword [eax], ebx
push esi
push str.read_and_dump__:_pre_adb_read_fd_d__n
mov eax, dword [ebp - 0x1014]
push eax
call fcn.00407d40
pop eax
mov eax, dword [ebp - 0x1014]
push eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4ddfe8
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
call sub.msvcrt.dll__errno
mov dword [eax], ebx
jmp 0x407f60
call sub.msvcrt.dll__errno
sub esp, 0xc
mov eax, dword [eax]
mov dword [ebp - 0x1010], eax
push 0x4ddfe8
call sub.KERNEL32.dll_EnterCriticalSection
mov ebx, dword [sym.imp.msvcrt.dll__iob]
add esp, 0xc
add ebx, 0x40
push str.read_and_dump
push str.system_core_adb_commandline.c
push 0x4a19f8
push ebx
call fcn.00407d40
call sub.msvcrt.dll__errno
mov edx, dword [ebp - 0x1010]
mov dword [eax], edx
push edi
push esi
push str.read_and_dump__:_post_adb_read_fd_d_:_len_d_n
push ebx
call fcn.00407d40
add esp, 0x14
push ebx
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4ddfe8
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
call sub.msvcrt.dll__errno
mov edx, dword [ebp - 0x1010]
cmp edi, 0
mov dword [eax], edx
jne 0x407f8e
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
call sub.msvcrt.dll__errno
cmp dword [eax], 4
je 0x407f50
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x408560
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov eax, 0x103c
mov ebp, esp
push edi
push esi
push ebx
call fcn.00495ce0
mov esi, dword [ebp + 0x14]
push esi
lea eax, [ebp - 0x1014]
mov ecx, dword [ebp + 8]
push ecx
push 0x4a1b89
mov dword [ebp - 0x1044], eax
push eax
call fcn.00408540
lea eax, [ebp - 0x1014]
mov dword [esp], eax
call fcn.0040b8a0
add esp, 0x10
mov dword [ebp - 0x1028], eax
test eax, eax
js 0x40879f
sub esp, 0xc
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0x10000
push 4
push eax
push 0x1001
push 0xffff
mov eax, dword [ebp - 0x1028]
push eax
call sub.WS2_32.DLL_setsockopt
mov dword [ebp - 0x102c], esi
add esp, 0xc
mov dword [ebp - 0x14], eax
test esi, esi
jle 0x4086b0
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov edx, dword [ebp + 0x10]
add eax, 0x20
mov dword [ebp - 0x1024], edx
mov dword [ebp - 0x1040], eax
jmp 0x408617
test esi, esi
jle 0x4086b0
mov eax, dword [ebp - 0x1024]
add eax, edi
mov dword [ebp - 0x1024], eax
mov edi, esi
cmp esi, 0x10000
jle 0x408626
mov edi, 0x10000
push eax
push edi
mov eax, dword [ebp - 0x1024]
push eax
mov ebx, dword [ebp - 0x1028]
push ebx
call fcn.00405ae0
add esp, 0x10
test eax, eax
jne 0x408711
mov edx, dword [ebp + 0x18]
sub esi, edi
test edx, edx
je 0x408601
mov ebx, 0x64
mov eax, esi
imul ebx
sub esp, 0x10
mov dword [ebp - 0x1038], eax
mov dword [ebp - 0x1034], edx
mov eax, dword [ebp - 0x102c]
xor edx, edx
push edx
push eax
mov eax, dword [ebp - 0x1034]
push eax
mov eax, dword [ebp - 0x1038]
push eax
call fcn.00495d10
add esp, 0x1c
sub ebx, eax
push ebx
mov eax, dword [ebp + 0xc]
push eax
push str.sending:__s__4d_______r
call fcn.004080e0
pop eax
mov eax, dword [ebp - 0x1040]
push eax
call sub.msvcrt.dll_fflush
add esp, 0x10
test esi, esi
jg 0x408609
mov edi, dword [ebp + 0x18]
test edi, edi
jne 0x40874a
lea edx, [ebp - 0x1014]
push esi
push 4
push edx
mov ebx, dword [ebp - 0x1028]
push ebx
call fcn.00405580
add esp, 0x10
test eax, eax
jne 0x40875f
cld
mov edi, 0x4a1bf2
mov ecx, 4
mov esi, dword [ebp - 0x1044]
repe cmpsb byte [esi], byte es:[edi]
jne 0x408789
sub esp, 0xc
mov eax, dword [ebp - 0x1028]
push eax
call fcn.00414200
xor eax, eax
add esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
sub esp, 0xc
mov ecx, dword [ebp - 0x1028]
push ecx
call fcn.0040b260
call fcn.0040b1f0
add esp, 0xc
push eax
push str._failed_to_write_data__s__n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
call fcn.00407d40
or eax, 0xffffffff
add esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
sub esp, 0xc
push 0x4a1bd4
call fcn.004080e0
add esp, 0x10
jmp 0x4086bb
push ecx
push ecx
push str._error_reading_response__n
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
call fcn.00407d40
pop eax
mov eax, dword [ebp - 0x1028]
push eax
call fcn.00414200
or eax, 0xffffffff
add esp, 0x10
jmp 0x408709
lea eax, [ebp - 0x1014]
mov byte [ebp - 0x1010], 0
push edx
push eax
push str._error_response__s__n
jmp 0x408766
call fcn.0040b1f0
push edx
push eax
push 0x4a1b8f
jmp 0x40872e
Function at 0x408820
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x10
push str.shell:
call fcn.0040b8a0
add esp, 0x10
mov ebx, eax
test eax, eax
js 0x408870
sub esp, 0xc
push 8
call sub.msvcrt.dll_malloc
add esp, 0xc
mov dword [eax], ebx
mov dword [eax + 4], 0
push eax
push 0
push 0x4088a0
call sub.msvcrt.dll__beginthread
mov eax, ebx
call fcn.00407f20
xor eax, eax
add esp, 0x10
mov ebx, dword [ebp - 4]
leave
ret
call fcn.0040b1f0
push edx
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
push 0x4a1b8f
add eax, 0x40
push eax
call fcn.00407d40
mov eax, 1
add esp, 0x10
mov ebx, dword [ebp - 4]
leave
ret
Function at 0x40bf10
Capabilities:
Create directory
Get common file path
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x248
mov dword [ebp - 0x240], eax
mov dword [ebp - 0x244], edx
push 0x4a2b0c
call sub.msvcrt.dll_getenv
add esp, 0x10
mov edi, eax
test eax, eax
je 0x40c041
test byte [0x4ddfd9], 4
jne 0x40bfd3
sub esp, 0xc
push 0x4a2b55
push edi
lea edi, [ebp - 0x133]
push 0x4a2b5e
push 0x103
push edi
call fcn.004963f0
add esp, 0x20
cmp eax, 0x102
jle 0x40bf80
or eax, 0xffffffff
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [ebp - 0x30]
push esi
push esi
push eax
push edi
call sub.msvcrt.dll__stat
add esp, 0x10
test eax, eax
je 0x40bfa7
sub esp, 0xc
push edi
call sub.msvcrt.dll__mkdir
add esp, 0x10
test eax, eax
js 0x40c062
sub esp, 0xc
push str.adbkey
push edi
push 0x4a2b5e
mov ebx, dword [ebp - 0x244]
push ebx
mov ecx, dword [ebp - 0x240]
push ecx
call fcn.004963f0
add esp, 0x20
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
call sub.msvcrt.dll__errno
sub esp, 0xc
mov esi, dword [eax]
push 0x4ddfe8
call sub.KERNEL32.dll_EnterCriticalSection
mov ebx, dword [sym.imp.msvcrt.dll__iob]
add esp, 0xc
add ebx, 0x40
push str.get_user_keyfilepath
push str.system_core_adb_adb_auth_host.c
push 0x4a2b40
push ebx
call fcn.0040bef0
call sub.msvcrt.dll__errno
add esp, 0xc
mov dword [eax], esi
push edi
push str.home__s_n
push ebx
call fcn.0040bef0
mov dword [esp], ebx
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4ddfe8
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
call sub.msvcrt.dll__errno
mov dword [eax], esi
jmp 0x40bf4c
sub esp, 0xc
lea ebx, [ebp - 0x236]
mov edi, ebx
push ebx
push 0
push 0
push 0x28
push 0
call sub.SHELL32.DLL_SHGetFolderPathA
add esp, 0xc
jmp 0x40bf3f
test byte [0x4ddfd9], 4
je 0x40bf75
call sub.msvcrt.dll__errno
sub esp, 0xc
mov esi, dword [eax]
push 0x4ddfe8
call sub.KERNEL32.dll_EnterCriticalSection
mov ebx, dword [sym.imp.msvcrt.dll__iob]
add esp, 0xc
add ebx, 0x40
push str.get_user_keyfilepath
push str.system_core_adb_adb_auth_host.c
push 0x4a2b40
push ebx
call fcn.0040bef0
call sub.msvcrt.dll__errno
add esp, 0xc
mov dword [eax], esi
push edi
push str.Cannot_mkdir__s
push ebx
call fcn.0040bef0
mov dword [esp], ebx
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4ddfe8
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
call sub.msvcrt.dll__errno
mov dword [eax], esi
or eax, 0xffffffff
jmp 0x40bf78
Function at 0x40faf0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x28
mov esi, eax
lea eax, [ebp - 0x14]
mov edi, edx
push eax
call fcn.00415bd0
add esp, 0x10
test eax, eax
jne 0x40fbe5
sub esp, 0xc
push 0xc
call sub.msvcrt.dll_malloc
add esp, 0x10
mov ebx, eax
test eax, eax
je 0x40fbd0
mov dword [ebx], esi
mov dword [ebx + 8], edi
mov eax, dword [ebp - 0x10]
mov dword [ebx + 4], eax
push esi
push ebx
push 0
push 0x40fa80
call sub.msvcrt.dll__beginthread
add esp, 0x10
inc eax
je 0x40fbfd
test byte [0x4ddfd9], 2
jne 0x40fb60
mov eax, dword [ebp - 0x14]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
call sub.msvcrt.dll__errno
sub esp, 0xc
mov esi, dword [eax]
push 0x4ddfe8
call sub.KERNEL32.dll_EnterCriticalSection
mov ebx, dword [sym.imp.msvcrt.dll__iob]
add esp, 0xc
add ebx, 0x40
push str.create_service_thread
push str.system_core_adb_services.c
push 0x4a37b3
push ebx
call fcn.0040fad0
call sub.msvcrt.dll__errno
mov dword [eax], esi
mov eax, dword [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x14]
push eax
push str.service_thread_started___d:_d_n
push ebx
call fcn.0040fad0
add esp, 0x14
push ebx
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4ddfe8
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
call sub.msvcrt.dll__errno
mov dword [eax], esi
jmp 0x40fb54
sub esp, 0xc
push str.cannot_allocate_stinfo
call fcn.00401470
add esp, 0x10
jmp 0x40fb28
sub esp, 0xc
push str.cannot_create_service_socket_pair_n
call fcn.0040fab0
or eax, 0xffffffff
add esp, 0x10
jmp 0x40fb57
sub esp, 0xc
push ebx
call sub.msvcrt.dll_free
pop ecx
mov edx, dword [ebp - 0x14]
push edx
call fcn.00414200
pop eax
mov eax, dword [ebp - 0x10]
push eax
call fcn.00414200
mov dword [esp], str.cannot_create_service_thread_n
call fcn.0040fab0
or eax, 0xffffffff
add esp, 0x10
jmp 0x40fb57
Function at 0x412280
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push 0
push 0
push 0x4126f0
call sub.msvcrt.dll__beginthread
add esp, 0x10
inc eax
je 0x4122a0
leave
ret
sub esp, 0xc
push str.cannot_create_input_thread
call fcn.00402660
add esp, 0x10
leave
ret

Function at 0x412e60
Capabilities:
Get common file path
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x120
push str.ANDROID_SDK_HOME
call sub.msvcrt.dll_getenv
add esp, 0x10
test eax, eax
je 0x412e96
push eax
mov ebx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
push str._s_s_s
push eax
push ebx
call fcn.00412e20
add esp, 0x10
mov ebx, dword [ebp - 4]
leave
ret
sub esp, 0xc
lea ebx, [ebp - 0x108]
push ebx
push 0
push 0
push 0x28
push 0
call sub.SHELL32.DLL_SHGetFolderPathA
add esp, 0xc
push ebx
jmp 0x412e7c
Function at 0x415160
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
call fcn.00414030
mov edx, eax
test eax, eax
je 0x415183
mov dword [ebp - 4], 1
cmp dword [eax], 0x4a4b54
je 0x415185
leave
ret
sub esp, 0xc
lea eax, [ebp - 4]
push 4
push eax
push 1
push 6
mov eax, dword [edx + 0xc]
push eax
call sub.WS2_32.DLL_setsockopt
add esp, 0xc
leave
ret

Function at 0x415690
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x198
mov eax, dword [0x4daf58]
test eax, eax
je 0x4156a4
leave
ret
lea eax, [ebp - 0x190]
push ecx
push ecx
push eax
push 0x202
call sub.WS2_32.DLL_WSAStartup
pop ecx
test eax, eax
pop edx
jne 0x4156e0
sub esp, 0xc
push 0x415700
call section..text
mov dword [0x4daf58], 1
add esp, 0x10
leave
ret
sub esp, 0xc
push str.adb:_could_not_initialize_Winsock_n
call fcn.00401470
add esp, 0x10
jmp 0x4156bd