joyce8/EMBER2024-capa huggingface dataset:
Function at 0x418f48
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffdf8
push ebx
push esi
push edi
xor eax, eax
mov dword [ebp - 4], eax
xor ebx, ebx
push 0x200
call sub.msvcrt.dll_malloc
pop ecx
mov esi, eax
push 0
push 0
push 0
push 0
push dword [ebp + 0x1c]
call dword [ebp + 8]
mov dword [ebp - 8], eax
push 0
push dword [ebp + 0x24]
push 0
push 0
push dword [ebp + 0x18]
push dword [ebp - 8]
call dword [ebp + 0xc]
mov edi, eax
jmp 0x418fbd
push ebx
push dword [ebp - 4]
lea eax, [ebp - 0x208]
push eax
push esi
call fcn.00418f1b
add esp, 0x10
add ebx, dword [ebp - 4]
xor edx, edx
mov dword [ebp - 4], edx
lea ecx, [ebx + 0x200]
push ecx
push esi
call sub.msvcrt.dll_realloc
add esp, 8
mov esi, eax
lea eax, [ebp - 4]
push eax
push 0x200
lea edx, [ebp - 0x208]
push edx
push edi
call dword [ebp + 0x10]
cmp dword [ebp - 4], 0
jne 0x418f8f
push edi
call dword [ebp + 0x14]
push dword [ebp - 8]
call dword [ebp + 0x14]
push 0x41b1a9
push dword [ebp + 0x20]
call sub.msvcrt.dll_fopen
add esp, 8
mov edi, eax
push edi
push 1
push ebx
push esi
call sub.msvcrt.dll_fwrite
add esp, 0x10
push edi
call sub.msvcrt.dll_fclose
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x10005e30
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
cmp byte [0x1001d994], 0
jne 0x1000610a
push esi
push str.0:db0:lk0:hs1:ld0:ll0:hb0:pj1_.2_.4202:zb0.1:bb
mov byte [0x1001d994], 1
call fcn.1000765f
push 0x12a0
push 0
push 0x1001c6e0
call fcn.1000c8f0
push 0
push 0x1001c6fe
push 0x100175cc
call fcn.10005d60
push 0
push 0x1001c8fc
push 0x100175d4
call fcn.10005d60
push 0x1001c938
push 0
push 0x100175dc
call fcn.10005d60
push 0
push 0x1001c93c
push 0x100175e4
call fcn.10005d60
add esp, 0x40
push 0
push 0x1001cb3a
push 0x100175ec
call fcn.10005d60
push 0x1001cb78
push 0
push 0x100175f4
call fcn.10005d60
push 0
push 0x1001cb7c
push 0x100175fc
call fcn.10005d60
push 0
push 0x1001cd7a
push 0x10017604
call fcn.10005d60
push 0x1001cdb8
push 0
push 0x1001760c
call fcn.10005d60
push 0
push 0x1001cdbc
push 0x10017614
call fcn.10005d60
add esp, 0x48
push 0
push 0x1001cdf8
push 0x1001761c
call fcn.10005d60
push 0
push 0x1001ce34
push 0x10017624
call fcn.10005d60
push 0
push 0x1001ce98
push 0x1001762c
call fcn.10005d60
push 0
push 0x1001cefc
push 0x10017634
call fcn.10005d60
push 0x1001cf60
push 0
push 0x1001763c
call fcn.10005d60
push 0x1001cf64
push 0
push 0x10017644
call fcn.10005d60
add esp, 0x48
push 0x1001cf68
push 0
push 0x1001764c
call fcn.10005d60
push 0x1001cf6c
push 0
push 0x10017654
call fcn.10005d60
push 0x1001cf70
push 0
push 0x1001765c
call fcn.10005d60
push 0x1001cf74
push 0
push 0x10017664
call fcn.10005d60
push 0x1001cf78
push 0
push 0x1001766c
call fcn.10005d60
push 0x1001cf7c
push 0
push 0x10017674
call fcn.10005d60
add esp, 0x48
lea eax, [ebp - 0xc]
push eax
push 0x20019
push 0
push str.Console
push connect
mov dword [ebp - 8], 3
mov dword [ebp - 4], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x10006032
mov eax, dword [ebp - 0xc]
lea ecx, [ebp - 4]
push ecx
push 0
lea edx, [ebp - 8]
push edx
push 0
push str.IpDate
push eax
call esi
cmp dword [ebp - 4], 0xa
jbe 0x10006109
push 0x7d0
push 0
push str.0:db0:lk0:hs1:ld0:ll0:hb0:pj1_.2_.4202:zb0.1:bb
call fcn.1000c8f0
mov eax, dword [ebp - 0xc]
add esp, 0xc
lea ecx, [ebp - 4]
push ecx
push str.0:db0:lk0:hs1:ld0:ll0:hb0:pj1_.2_.4202:zb0.1:bb
lea edx, [ebp - 8]
push edx
push 0
push str.IpDate
push eax
call esi
push 0
push 0x1001c6fe
push 0x100175cc
call fcn.10005d60
push 0
push 0x1001c8fc
push 0x100175d4
call fcn.10005d60
push 0x1001c938
push 0
push 0x100175dc
call fcn.10005d60
push 0
push 0x1001c93c
push 0x100175e4
call fcn.10005d60
push 0
push 0x1001cb3a
push 0x100175ec
call fcn.10005d60
push 0x1001cb78
push 0
push 0x100175f4
call fcn.10005d60
add esp, 0x48
push 0
push 0x1001cb7c
push 0x100175fc
call fcn.10005d60
push 0
push 0x1001cd7a
push 0x10017604
call fcn.10005d60
push 0x1001cdb8
push 0
push 0x1001760c
call fcn.10005d60
add esp, 0x24
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x10006380
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
dec eax
jne 0x100063d2
cmp dword [0x1001d980], eax
jne 0x100063d2
push str.0:db0:lk0:hs1:ld0:ll0:hb0:pj1_.2_.4202:zb0.1:bb
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp eax, 0x1e
jle 0x100063d2
call fcn.10005e30
cmp dword [0x1001cf70], 0
je 0x100063d2
push 0
push 0
push 0
push 0x10006110
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
push 0xffffffffffffffff
push eax
mov dword [0x1001d980], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, 1
pop ebp
ret 0xc

Function at 0x10006420
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
cmp dword [0x1001d980], 0
jne 0x10006480
push esi
mov esi, dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax + eax + 2]
push eax
push esi
push str.0:db0:lk0:hs1:ld0:ll0:hb0:pj1_.2_.4202:zb0.1:bb
call fcn.1000c970
add esp, 0xc
call fcn.10005e30
push 0
push 0
push 0
push 0x10006110
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
push 0xffffffffffffffff
push eax
mov dword [0x1001d980], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [0x1001d980]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
pop ebp
ret

Function at 0x10006490
Capabilities:
Create thread

Disassembly:
push 0
push 0
push 0
push 0x10006110
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
push 0xffffffffffffffff
push eax
mov dword [0x1001d980], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
xor eax, eax
ret

Function at 0x100068f5
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x100191b0]
jne 0x100068ff
repz ret
jmp fcn.10007962
Function at 0x401610
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x24
test byte [ebp + 0xc], 1
jne 0x401622
mov ebx, dword [ebp - 4]
leave
ret
mov dword [ebp - 8], 0x10
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [ebp + 8]
push eax
call dbg.adb_socket_accept
add esp, 0x10
mov ebx, eax
test eax, eax
js 0x40161d
sub esp, 0xc
mov dword [ebp - 0xc], 0x10000
lea eax, [ebp - 0xc]
push 4
push eax
push 0x1002
push 0xffff
push ebx
call sub.WS2_32.DLL_setsockopt
push ebx
call dbg.create_local_socket
add esp, 0x10
test eax, eax
je 0x401682
sub esp, 0xc
push eax
call dbg.connect_to_smartsocket
add esp, 0x10
mov ebx, dword [ebp - 4]
leave
ret
sub esp, 0xc
push ebx
call dbg.adb_close
add esp, 0x10
jmp 0x40161d
Function at 0x4019b0
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 0x401b16
push eax
mov eax, dword [ebp - 0x14]
push 0
push 1
push eax
call sub.KERNEL32.dll_SetHandleInformation
lea edi, [ebp - 0x7c]
lea ebx, [ebp - 0x180]
push 0x44
push 0
push edi
call sym._memset
mov dword [ebp - 0x7c], 0x44
mov dword [esp], 0xfffffff6
call sub.KERNEL32.dll_GetStdHandle
lea esi, [ebp - 0x38]
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
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 0x401b24
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 0x401b50
cmp dword [ebp - 0x1c], 3
jne 0x401ae3
cmp byte [ebp - 0xf], 0x4f
je 0x401b06
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 sym._fprintf
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 0x401ae3
xor eax, eax
cmp byte [ebp - 0xd], 0xa
jne 0x401ae3
jmp 0x401afe
call sub.KERNEL32.dll_GetLastError
push edx
push eax
push str.CreatePipe___failure__error__ld_n
jmp 0x401aea
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 sym._fprintf
pop eax
mov eax, dword [ebp - 0x14]
push eax
call sub.KERNEL32.dll_CloseHandle
or eax, 0xffffffff
add esp, 0xc
jmp 0x401afe
call sub.KERNEL32.dll_GetLastError
push edx
push eax
push str.could_not_read_ok_from_ADB_Server__error___ld_n
jmp 0x401aea
Function at 0x401b60
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 0x401b83
test edx, 0x8080
je 0x401c60
add dl, dl
mov eax, ecx
sbb eax, 3
mov dword [eax], 0x2e626461
mov dword [eax + 4], 0x676f6c
push 0x4262cb
push 0x4262ce
call sym._fopen
add esp, 0x10
mov dword [ebp - 0x120], eax
test eax, eax
je 0x401c7e
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 esi
push esi
push 0x4262d2
push edi
call sym._fopen
add esp, 0x10
mov dword [ebp - 0x138], eax
test eax, eax
je 0x401c70
mov ecx, dword [ebp - 0x138]
push 0
push 4
push 0
push ecx
call sym._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 sym._getpid
add esp, 0xc
push eax
push str.____adb_starting__pid__d______n
push ebx
call sym._fprintf
add esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
shr edx, 0x10
add ecx, 2
jmp 0x401ba7
mov eax, dword [ebp - 0x120]
mov dword [ebp - 0x138], eax
jmp 0x401c0d
mov ebx, dword [sym.imp.msvcrt.dll__iob]
jmp 0x401bed

Function at 0x402540
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x28
push str.ADB_TRACE
call sym._getenv
add esp, 0x10
mov dword [ebp - 0x14], eax
test eax, eax
je 0x4025fc
mov al, byte [eax]
test al, al
je 0x4025fc
push eax
push eax
push str.__:_
mov eax, dword [ebp - 0x14]
push eax
call sym._strpbrk
add esp, 0x10
mov dword [ebp - 0x10], eax
test eax, eax
je 0x402613
mov edi, dword [ebp - 0x10]
mov esi, dword [ebp - 0x14]
sub edi, esi
mov ebx, dword [0x4267c0]
mov dword [ebp - 0x20], edi
test ebx, ebx
je 0x4025f4
mov esi, dword [0x4267c0]
xor ebx, ebx
jmp 0x4025b4
inc ebx
mov esi, dword [ebx*8 + 0x4267c0]
test esi, esi
je 0x4025f4
sub esp, 0xc
push esi
call sym._strlen
add esp, 0x10
cmp dword [ebp - 0x20], eax
jne 0x4025a8
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 0x4025a8
mov ecx, dword [ebx*8 + 0x4267c4]
test ecx, ecx
je 0x40262f
mov eax, 1
shl eax, cl
mov ecx, dword [0x443b68]
or ecx, eax
mov dword [0x443b68], ecx
mov eax, dword [ebp - 0x10]
cmp byte [eax], 0
jne 0x402604
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 0x402563
sub esp, 0xc
mov eax, dword [ebp - 0x14]
push eax
call sym._strlen
mov edi, dword [ebp - 0x14]
add esp, 0x10
add eax, edi
mov dword [ebp - 0x10], eax
jmp 0x402589
mov dword [0x443b68], 0xffffffff
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x403500
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
sub esp, 0x3c
push dbg.adb_cleanup
call dbg.atexit
pop eax
pop edx
push 1
push dbg.ctrlc_handler
call sub.KERNEL32.dll_SetConsoleCtrlHandler
pop esi
pop eax
call dbg.init_transport_registration
mov dword [0x431008], 1
call dbg.usb_vendors_init
call dbg.usb_init
sub esp, 0xc
push 0x15b3
call dbg.local_init
add esp, 0xc
mov ebx, dword [ebp + 0xc]
push ebx
lea ebx, [ebp - 0x2a]
push 0x1e
push ebx
call dbg.build_local_name
xor ecx, ecx
mov edx, str.smartsocket
mov eax, ebx
call dbg.install_listener
add esp, 0x10
test eax, eax
jne 0x40362b
mov ecx, dword [ebp + 8]
test ecx, ecx
jne 0x403601
test byte [0x443b68], 1
je 0x4035ee
call sym.__errno
sub esp, 0xc
mov esi, dword [eax]
push 0x443b48
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 0x426056
push ebx
call sym._fprintf
call sym.__errno
mov dword [eax], esi
pop eax
pop edx
push str.Event_loop_starting_n
push ebx
call sym._fprintf
mov dword [esp], ebx
call sym._fflush
mov dword [esp], 0x443b48
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
call sym.__errno
mov dword [eax], esi
call dbg.fdevent_loop
call dbg.usb_cleanup
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 0x4266d4
push eax
call sub.KERNEL32.dll_WriteFile
add esp, 0xc
call dbg.start_logging
jmp 0x40357e
sub esp, 0xc
push 1
call sym._exit
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
Function at 0x406390
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x58
push str.ADBHOST
call sym._getenv
add esp, 0x10
test eax, eax
je 0x406480
mov edx, dword [ebp + 0xc]
push ecx
push 1
push edx
push eax
call dbg.socket_network_client
add esp, 0x10
mov edi, eax
test eax, eax
js 0x406480
test byte [0x443b68], 8
jne 0x406411
sub esp, 0xc
lea ebx, [ebp - 0x4c]
push edi
call dbg.disable_tcp_nagle
pop eax
mov eax, dword [ebp + 8]
push eax
push 0x427442
push str._s_d
push 0x40
push ebx
call sym.___mingw_snprintf
add esp, 0x20
mov eax, dword [ebp + 0xc]
push 1
push eax
push ebx
push edi
call dbg.register_socket_transport
xor eax, eax
add esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
call sym.__errno
sub esp, 0xc
mov esi, dword [eax]
push 0x443b48
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 0x427412
push ebx
call sym._fprintf_3
call sym.__errno
add esp, 0xc
mov dword [eax], esi
push edi
push str.client:_connected_on_remote_on_fd__d_n
push ebx
call sym._fprintf_3
mov dword [esp], ebx
call sym._fflush
mov dword [esp], 0x443b48
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
call sym.__errno
mov dword [eax], esi
jmp 0x4063d1
push eax
push eax
mov eax, dword [ebp + 0xc]
push 1
push eax
call dbg.socket_loopback_client
mov edi, eax
add esp, 0x10
or eax, 0xffffffff
test edi, edi
jns 0x4063c8
jmp 0x406409

Function at 0x4065c0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xc
mov esi, dbg.client_socket_thread
mov ebx, dword [0x431008]
test ebx, ebx
jne 0x4065dd
mov esi, dbg.server_socket_thread
test byte [0x443b68], 8
jne 0x406630
push edi
mov ebx, dword [ebp + 8]
push ebx
push 0
push esi
call sym.__beginthread
add esp, 0x10
inc eax
je 0x406601
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [0x431008]
mov eax, str.client
test ecx, ecx
jne 0x406615
mov eax, 0x427458
push edx
push edx
push eax
push str.cannot_create_local_socket__s_thread
call dbg.fatal_errno
add esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
call sym.__errno
sub esp, 0xc
mov edi, dword [eax]
push 0x443b48
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 0x427412
push ebx
call sym._fprintf_3
call sym.__errno
add esp, 0x10
mov dword [eax], edi
mov eax, str.client
mov ecx, dword [0x431008]
test ecx, ecx
jne 0x406683
mov eax, 0x427458
push edx
push eax
push str.transport:_local__s_init_n
push ebx
call sym._fprintf_3
mov dword [esp], ebx
call sym._fflush
mov dword [esp], 0x443b48
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
call sym.__errno
mov dword [eax], edi
jmp 0x4065e6
Function at 0x4075d0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
push eax
mov eax, 0x1008
call fcn.0041f230
mov eax, dword [ebp - 0x10]
mov esi, eax
test eax, eax
js 0x40776a
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [ebp - 0x1014], eax
lea esi, [esi]
test byte [0x443b68], 1
jne 0x407671
lea esi, [esi]
lea edx, [ebp - 0x100c]
push eax
push 0x1000
push edx
push esi
call dbg.adb_read
add esp, 0x10
mov edi, eax
test byte [0x443b68], 1
jne 0x4076e7
cmp edi, 0
je 0x40776a
jl 0x407772
mov ebx, dword [sym.imp.msvcrt.dll__iob]
lea eax, [ebp - 0x100c]
add ebx, 0x20
push ebx
push edi
push 1
push eax
call sym._fwrite
mov dword [esp], ebx
call sym._fflush
add esp, 0x10
test byte [0x443b68], 1
je 0x407610
call sym.__errno
sub esp, 0xc
mov ebx, dword [eax]
push 0x443b48
call sub.KERNEL32.dll_EnterCriticalSection
add esp, 0xc
push global___FUNCTION__.44
push str.system_core_adb_commandline.c
push 0x4294c7
mov eax, dword [ebp - 0x1014]
push eax
call sym._fprintf_5
call sym.__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 sym._fprintf_5
pop eax
mov eax, dword [ebp - 0x1014]
push eax
call sym._fflush
mov dword [esp], 0x443b48
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
call sym.__errno
mov dword [eax], ebx
jmp 0x407610
call sym.__errno
sub esp, 0xc
mov eax, dword [eax]
mov dword [ebp - 0x1010], eax
push 0x443b48
call sub.KERNEL32.dll_EnterCriticalSection
mov ebx, dword [sym.imp.msvcrt.dll__iob]
add esp, 0xc
add ebx, 0x40
push global___FUNCTION__.44
push str.system_core_adb_commandline.c
push 0x4294c7
push ebx
call sym._fprintf_5
call sym.__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 sym._fprintf_5
add esp, 0x14
push ebx
call sym._fflush
mov dword [esp], 0x443b48
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
call sym.__errno
mov edx, dword [ebp - 0x1010]
cmp edi, 0
mov dword [eax], edx
jne 0x40763e
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
call sym.__errno
cmp dword [eax], 4
je 0x407600
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x407f10
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x10
push str.shell:
call dbg.adb_connect
add esp, 0x10
mov ebx, eax
test eax, eax
js 0x407f60
sub esp, 0xc
push 8
call sym._malloc
add esp, 0xc
mov dword [eax], ebx
mov dword [eax + 4], 0
push eax
push 0
push dbg.stdin_read_thread
call sym.__beginthread
mov eax, ebx
call dbg.read_and_dump
xor eax, eax
add esp, 0x10
mov ebx, dword [ebp - 4]
leave
ret
call dbg.adb_error
push edx
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
push 0x42965f
add eax, 0x40
push eax
call sym._fprintf_5
mov eax, 1
add esp, 0x10
mov ebx, dword [ebp - 4]
leave
ret
Function at 0x407f90
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x428
xor esi, esi
mov eax, dword [ebp + 8]
lea ebx, [ebp - 0x40c]
mov edx, dword [eax]
mov dword [ebp - 0x41c], edx
mov edx, dword [eax + 4]
push eax
mov dword [ebp - 0x418], edx
call sym._free
mov eax, dword [sym.imp.msvcrt.dll__iob]
add esp, 0x10
add eax, 0x40
mov dword [ebp - 0x420], eax
test byte [0x443b68], 1
jne 0x408120
mov edx, dword [ebp - 0x418]
push ecx
push 0x400
push ebx
push edx
call sym._read
add esp, 0x10
mov edi, eax
test byte [0x443b68], 1
jne 0x408089
cmp edi, 0
je 0x40803a
jl 0x40819c
xor edx, edx
nop
mov al, byte [edx + ebx]
cmp al, 0xd
je 0x408044
ja 0x408050
cmp al, 0xa
je 0x408044
xor esi, esi
inc edx
cmp edx, edi
jne 0x408010
mov ecx, dword [ebp - 0x41c]
push eax
push edi
push ebx
push ecx
call dbg.adb_write
add esp, 0x10
test eax, eax
jg 0x407fcf
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
mov esi, 1
jmp 0x40801f
cmp al, 0x2e
je 0x408063
cmp al, 0x7e
jne 0x40801d
cmp esi, 1
jne 0x40801f
mov si, 2
jmp 0x40801f
cmp esi, 2
jne 0x40801d
push eax
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
push str._n_disconnect__n
add eax, 0x40
push eax
call sym._fprintf_5
mov dword [esp], 0
call sym._exit
call sym.__errno
sub esp, 0xc
mov eax, dword [eax]
push 0x443b48
mov dword [ebp - 0x414], eax
call sub.KERNEL32.dll_EnterCriticalSection
mov edx, dword [sym.imp.msvcrt.dll__iob]
add esp, 0xc
add edx, 0x40
push global___FUNCTION__.37
mov dword [ebp - 0x410], edx
push str.system_core_adb_commandline.c
push 0x4294c7
push edx
call sym._fprintf_5
call sym.__errno
mov edx, dword [ebp - 0x414]
add esp, 0xc
mov dword [eax], edx
mov eax, dword [ebp - 0x418]
push eax
mov eax, dword [ebp - 0x410]
push str.stdin_read_thread__:_post_unix_read_fdi_d_...__n
push eax
call sym._fprintf_5
pop eax
mov eax, dword [ebp - 0x410]
push eax
call sym._fflush
mov dword [esp], 0x443b48
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
call sym.__errno
mov edx, dword [ebp - 0x414]
mov dword [eax], edx
jmp 0x408001
call sym.__errno
sub esp, 0xc
mov edi, dword [eax]
push 0x443b48
call sub.KERNEL32.dll_EnterCriticalSection
mov eax, dword [ebp - 0x420]
add esp, 0xc
push global___FUNCTION__.37
push str.system_core_adb_commandline.c
push 0x4294c7
push eax
call sym._fprintf_5
call sym.__errno
add esp, 0xc
mov dword [eax], edi
mov eax, dword [ebp - 0x418]
push eax
mov eax, dword [ebp - 0x420]
push str.stdin_read_thread__:_pre_unix_read_fdi_d_...__n
push eax
call sym._fprintf_5
pop eax
mov eax, dword [ebp - 0x420]
push eax
call sym._fflush
mov dword [esp], 0x443b48
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
call sym.__errno
mov dword [eax], edi
jmp 0x407fdc
call sym.__errno
cmp dword [eax], 4
je 0x407fcf
jmp 0x40803a