joyce8/EMBER2024-capa huggingface dataset:
Function at 0x48edb0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, dword [esp + 8]
sub esp, 4
push ebx
push esi
mov esi, dword [esp + 0x10]
push edi
push ebp
push 2
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
test edi, edi
jne 0x48eddb
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebx, eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov esi, eax
test esi, esi
jne 0x48edff
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
push ebx
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebp, eax
test ebp, ebp
jne 0x48ee1a
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
mov edi, ebp
mov ecx, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x20]
xor ecx, ecx
mov cl, ah
mov edx, eax
mov dword [esp + 0x10], 0
shl ecx, 8
shr edx, 0x10
mov byte [esp + 0x10], dl
xor edx, edx
or ecx, dword [esp + 0x10]
mov dl, al
shl edx, 0x10
mov eax, dword [esp + 0x28]
or ecx, edx
mov edx, eax
shr edx, 0x10
mov dword [ebp + 0x28], ecx
mov dword [esp + 0x10], 0
xor ecx, ecx
mov byte [esp + 0x10], dl
mov cl, ah
xor edx, edx
shl ecx, 8
mov dl, al
shl edx, 0x10
or ecx, dword [esp + 0x10]
or ecx, edx
mov eax, dword [esp + 0x24]
mov edx, eax
mov dword [ebp + 0x44], ecx
shr edx, 0x10
xor ecx, ecx
mov dword [esp + 0x10], 0
mov cl, ah
mov byte [esp + 0x10], dl
shl ecx, 8
xor edx, edx
or ecx, dword [esp + 0x10]
mov dl, al
shl edx, 0x10
mov eax, dword [esp + 0x2c]
or ecx, edx
xor edx, edx
mov dl, al
mov dword [ebp + 0x48], ecx
shl edx, 0x10
xor ecx, ecx
mov cl, ah
shl ecx, 8
shr eax, 0x10
or ecx, edx
xor edx, edx
mov dl, al
mov eax, dword [esp + 0x30]
or ecx, edx
xor edx, edx
mov dl, al
mov dword [ebp + 0x64], ecx
shl edx, 0x10
xor ecx, ecx
mov cl, ah
shl ecx, 8
shr eax, 0x10
or ecx, edx
xor edx, edx
mov dl, al
mov eax, dword [esp + 0x34]
or ecx, edx
xor edx, edx
mov dl, al
mov dword [ebp + 0x54], ecx
shl edx, 0x10
xor ecx, ecx
mov cl, ah
shl ecx, 8
push 0
shr eax, 0x10
or ecx, edx
xor edx, edx
mov dl, al
or ecx, edx
mov dword [ebp + 0x50], ecx
call dword [sym.imp.USER32.dll_GetDC]
mov edi, eax
push 0
push ebp
lea ecx, [ebp + 0x68]
push ecx
push 4
push ebp
push edi
call dword [sym.imp.GDI32.dll_CreateDIBitmap]
mov esi, eax
push edi
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
push ebp
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, esi
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
Function at 0x490cd0
Capabilities:
Terminate process

Disassembly:
mov ecx, dword [esp + 4]
test ecx, ecx
je 0x490cea
mov eax, dword [ecx + 0x40]
test eax, eax
je 0x490cea
mov edx, dword [esp + 8]
push edx
push ecx
call eax
add esp, 8
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x49b320
Capabilities:
Check for software breakpoints

Disassembly:
push esi
mov esi, dword [esp + 8]
cmp dword [esi + 0x14], 0xca
jne 0x49b350
push esi
call fcn.0049b820
mov al, byte [esi + 0x40]
add esp, 4
test al, al
je 0x49b349
mov dword [esi + 0x14], 0xcf
mov al, 1
pop esi
ret
mov dword [esi + 0x14], 0xcb
mov eax, dword [esi + 0x14]
cmp eax, 0xcb
jne 0x49b3d3
mov eax, dword [esi + 0x1a0]
mov cl, byte [eax + 0x10]
test cl, cl
je 0x49b3bf
mov eax, dword [esi + 8]
test eax, eax
je 0x49b374
push esi
call dword [eax]
add esp, 4
mov ecx, dword [esi + 0x1a0]
push esi
call dword [ecx]
add esp, 4
test eax, eax
je 0x49b3bb
cmp eax, 2
je 0x49b3bf
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x49b367
cmp eax, 3
je 0x49b39a
cmp eax, 1
jne 0x49b367
mov eax, dword [ecx + 4]
inc eax
mov dword [ecx + 4], eax
mov eax, dword [esi + 8]
mov ecx, dword [eax + 8]
mov edx, dword [eax + 4]
cmp edx, ecx
jl 0x49b367
mov edx, dword [esi + 0x120]
add edx, ecx
mov dword [eax + 8], edx
jmp 0x49b367
xor al, al
pop esi
ret
mov eax, dword [esi + 0x7c]
push esi
mov dword [esi + 0x84], eax
call fcn.0049b400
add esp, 4
pop esi
ret
cmp eax, 0xcc
je 0x49b3f3
mov ecx, dword [esi]
push esi
mov dword [ecx + 0x14], 0x15
mov edx, dword [esi]
mov eax, dword [esi + 0x14]
mov dword [edx + 0x18], eax
mov ecx, dword [esi]
call dword [ecx]
add esp, 4
push esi
call fcn.0049b400
add esp, 4
pop esi
ret
Function at 0x4bb19d
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x4bb1d5
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthW]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.004b983c
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextW]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.004b9813
jmp 0x4bb1e1
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x4bb1e5
Capabilities:
Get graphical window text

Disassembly:
push esi
push edi
mov edi, dword [esp + 0x10]
mov esi, ecx
push 0x57e7d0
mov ecx, edi
call fcn.004b9515
cmp dword [esi + 0x34], 0
push dword [esp + 0xc]
jne 0x4bb238
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetDlgItem]
mov esi, eax
test esi, esi
je 0x4bb24b
push esi
call dword [sym.imp.USER32.dll_GetWindowTextLengthW]
lea ecx, [eax + 1]
push ecx
push eax
mov ecx, edi
call fcn.004b983c
push eax
push esi
call dword [sym.imp.USER32.dll_GetWindowTextW]
push 0xffffffffffffffff
mov ecx, edi
call fcn.004b9813
jmp 0x4bb24b
mov ecx, esi
call fcn.004bd378
test eax, eax
je 0x4bb24b
push edi
mov ecx, eax
call fcn.004bb19d
mov eax, dword [edi]
pop edi
pop esi
mov eax, dword [eax - 8]
ret 8

Function at 0x4bcaee
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x4bcb30
call fcn.004cd9ab
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
cmp eax, edi
je 0x4bcb30
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x4bcb27
xor eax, eax
jmp 0x4bcb38
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.004bcb3e
pop edi
pop esi
pop ebx
ret 4
Function at 0x4cf0ce
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
mov dword [ebp - 8], ecx
call fcn.004cd9ab
mov esi, dword [eax + 0xc]
push 0xf1
push dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x4cf10b
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x4cf10b
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
jne 0x4cf10f
xor eax, eax
jmp 0x4cf18d
movzx eax, word [esi + 6]
push ebx
push edi
shl eax, 2
push eax
call fcn.004b996d
and dword [ebp - 4], 0
cmp word [esi + 6], 0
pop ecx
mov ebx, eax
jbe 0x4cf147
mov ecx, ebx
lea eax, [esi + 8]
movzx edx, word [eax]
inc dword [ebp - 4]
mov dword [ecx], edx
movzx edx, word [esi + 6]
inc eax
add ecx, 4
inc eax
cmp dword [ebp - 4], edx
jl 0x4cf131
movzx eax, word [esi + 6]
mov ecx, dword [ebp - 8]
push eax
push ebx
call fcn.004cf27e
push ebx
mov edi, eax
call fcn.004b9996
test edi, edi
pop ecx
je 0x4cf189
movzx ecx, word [esi + 4]
movzx eax, word [esi + 2]
lea esi, [ecx + 7]
push ecx
mov ecx, dword [ebp - 8]
lea edx, [eax + 7]
push eax
push esi
push edx
call fcn.004cf047
push dword [ebp + 8]
mov ecx, dword [ebp - 8]
call fcn.004cf192
mov edi, eax
mov eax, edi
pop edi
pop ebx
pop esi
leave
ret 4
Function at 0x406605
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
cmp dword [0x43f76c], 0
jne 0x406643
xor ecx, ecx
push esi
push 8
mov eax, ecx
pop esi
mov edx, eax
and dl, 1
movzx edx, dl
neg edx
sbb edx, edx
and edx, 0xedb88320
shr eax, 1
xor eax, edx
dec esi
jne 0x406619
mov dword [ecx*4 + 0x43f768], eax
inc ecx
cmp ecx, 0x100
jl 0x406614
pop esi
cmp dword [ebp + 0x10], 0
mov eax, dword [ebp + 8]
not eax
jbe 0x406670
mov ecx, dword [ebp + 0xc]
movzx edx, byte [ecx]
dec dword [ebp + 0x10]
xor edx, eax
and edx, 0xff
shr eax, 8
xor eax, dword [edx*4 + 0x43f768]
inc ecx
cmp dword [ebp + 0x10], 0
ja 0x406651
not eax
pop ebp
ret 0xc

Function at 0x1002fab
Capabilities:
Parse pe header
Terminate process

Disassembly:
push 0x28
push 0x10012b0
call fcn.01003148
xor edi, edi
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
cmp word [eax], 0x5a4d
jne 0x1002fe6
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x1002fe6
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x1002ffe
cmp eax, 0x20b
je 0x1002feb
mov dword [ebp - 0x1c], edi
jmp 0x1003012
cmp dword [ecx + 0x84], 0xe
jbe 0x1002fe6
xor eax, eax
cmp dword [ecx + 0xf8], edi
jmp 0x100300c
cmp dword [ecx + 0x74], 0xe
jbe 0x1002fe6
xor eax, eax
cmp dword [ecx + 0xe8], edi
setne al
mov dword [ebp - 0x1c], eax
mov dword [ebp - 4], edi
push 1
call dword [sym.imp.msvcrt.dll___set_app_type]
pop ecx
or dword [0x1004034], 0xffffffff
or dword [0x1004038], 0xffffffff
call dword [sym.imp.msvcrt.dll___p__fmode]
mov ecx, dword [0x1004030]
mov dword [eax], ecx
call dword [sym.imp.msvcrt.dll___p__commode]
mov ecx, dword [0x100402c]
mov dword [eax], ecx
mov eax, dword [sym.imp.msvcrt.dll__adjust_fdiv]
mov eax, dword [eax]
mov dword [0x100403c], eax
call fcn.01003144
cmp dword [0x100401c], edi
jne 0x100306d
push fcn.01003144
call dword [sym.imp.msvcrt.dll___setusermatherr]
pop ecx
call fcn.01003132
push 0x10011a8
push 0x10011a4
call sub.msvcrt.dll__initterm
mov eax, dword [0x1004028]
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x20]
push eax
push dword [0x1004024]
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.msvcrt.dll___getmainargs]
mov dword [ebp - 0x30], eax
push 0x10011a0
push 0x100119c
call sub.msvcrt.dll__initterm
mov eax, dword [ebp - 0x24]
mov ecx, dword [sym.imp.msvcrt.dll___initenv]
mov dword [ecx], eax
push dword [ebp - 0x24]
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
call fcn.01002f3c
add esp, 0x30
mov esi, eax
mov dword [ebp - 0x34], esi
cmp dword [ebp - 0x1c], edi
jne 0x10030e4
push esi
call dword [sym.imp.msvcrt.dll_exit]
call dword [sym.imp.msvcrt.dll__cexit]
jmp 0x1003119
or dword [ebp - 4], 0xffffffff
mov eax, esi
call fcn.01003181
ret
Function at 0x4019e0
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 0x401a03
test edx, 0x8080
je 0x401ae0
add dl, dl
mov eax, ecx
sbb eax, 3
mov dword [eax], 0x2e626461
mov dword [eax + 4], 0x676f6c
push 0x4a812b
push 0x4a812e
call sub.msvcrt.dll_fopen
add esp, 0x10
mov dword [ebp - 0x120], eax
test eax, eax
je 0x401afe
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 0x4a8132
push edi
call sub.msvcrt.dll_fopen
add esp, 0x10
mov dword [ebp - 0x138], eax
test eax, eax
je 0x401af0
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 0x401a27
mov eax, dword [ebp - 0x120]
mov dword [ebp - 0x138], eax
jmp 0x401a8d
mov ebx, dword [sym.imp.msvcrt.dll__iob]
jmp 0x401a6d

Function at 0x402050
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 0x40210c
mov al, byte [eax]
test al, al
je 0x40210c
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 0x402123
mov edi, dword [ebp - 0x10]
mov esi, dword [ebp - 0x14]
sub edi, esi
mov ebx, dword [0x4a8820]
mov dword [ebp - 0x20], edi
test ebx, ebx
je 0x402104
mov esi, dword [0x4a8820]
xor ebx, ebx
jmp 0x4020c4
inc ebx
mov esi, dword [ebx*8 + 0x4a8820]
test esi, esi
je 0x402104
sub esp, 0xc
push esi
call sub.msvcrt.dll_strlen
add esp, 0x10
cmp dword [ebp - 0x20], eax
jne 0x4020b8
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 0x4020b8
mov ecx, dword [ebx*8 + 0x4a8824]
test ecx, ecx
je 0x40213f
mov eax, 1
shl eax, cl
mov ecx, dword [0x4ed098]
or ecx, eax
mov dword [0x4ed098], ecx
mov eax, dword [ebp - 0x10]
cmp byte [eax], 0
jne 0x402114
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 0x402073
sub esp, 0xc
mov eax, dword [ebp - 0x14]
push eax
call sub.msvcrt.dll_strlen
mov edi, dword [ebp - 0x14]
add esp, 0x10
add eax, edi
mov dword [ebp - 0x10], eax
jmp 0x402099
mov dword [0x4ed098], 0xffffffff
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x402e70
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.00404c60
mov dword [0x4d8008], 1
call fcn.004134c0
call fcn.004128b0
sub esp, 0xc
push 0x15b3
call fcn.00407010
call fcn.0040d1b0
add esp, 0xc
mov ebx, dword [ebp + 0xc]
push ebx
lea ebx, [ebp - 0x2a]
push 0x1e
push ebx
call fcn.00401470
xor ecx, ecx
mov edx, str.smartsocket
mov eax, ebx
mov dword [esp], 0
call fcn.004022d0
add esp, 0x10
test eax, eax
jne 0x402faa
mov ecx, dword [ebp + 8]
test ecx, ecx
jne 0x402f80
test byte [0x4ed098], 1
je 0x402f6a
call sub.msvcrt.dll__errno
sub esp, 0xc
mov esi, dword [eax]
push 0x4ed0a8
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 0x4a8056
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], 0x4ed0a8
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
call sub.msvcrt.dll__errno
mov dword [eax], esi
call fcn.00413ae0
call fcn.00412570
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 0x4a8524
push eax
call sub.KERNEL32.dll_WriteFile
add esp, 0xc
call fcn.004019e0
jmp 0x402efa
sub esp, 0xc
push 1
call sub.msvcrt.dll_exit
lea esi, [esi]
lea edi, [edi]

Function at 0x406de0
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 0x406ed0
mov edx, dword [ebp + 0xc]
push ecx
push 1
push edx
push eax
call fcn.00415cf0
add esp, 0x10
mov edi, eax
test eax, eax
js 0x406ed0
test byte [0x4ed098], 8
jne 0x406e61
sub esp, 0xc
lea ebx, [ebp - 0x4c]
push edi
call fcn.00415740
pop eax
mov eax, dword [ebp + 8]
push eax
push 0x4a9546
push str._s_d
push 0x40
push ebx
call fcn.004a0940
add esp, 0x20
mov eax, dword [ebp + 0xc]
push 1
push eax
push ebx
push edi
call fcn.00405050
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 0x4ed0a8
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 0x4a9516
push ebx
call fcn.00406da0
call sub.msvcrt.dll__errno
add esp, 0xc
mov dword [eax], esi
push edi
push 0x4a9520
push ebx
call fcn.00406da0
mov dword [esp], ebx
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4ed0a8
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
call sub.msvcrt.dll__errno
mov dword [eax], esi
jmp 0x406e21
push eax
push eax
mov eax, dword [ebp + 0xc]
push 1
push eax
call fcn.00416bc0
mov edi, eax
add esp, 0x10
or eax, 0xffffffff
test edi, edi
jns 0x406e18
jmp 0x406e59
Function at 0x407010
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0xc
mov esi, 0x407380
mov ebx, dword [0x4d8008]
test ebx, ebx
jne 0x40702d
mov esi, 0x407110
test byte [0x4ed098], 8
jne 0x407080
push edi
mov ebx, dword [ebp + 8]
push ebx
push 0
push esi
call sub.msvcrt.dll__beginthread
add esp, 0x10
inc eax
je 0x407051
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [0x4d8008]
mov eax, 0x4a9555
test ecx, ecx
jne 0x407065
mov eax, 0x4a955c
push edx
push edx
push eax
push str.cannot_create_local_socket__s_thread
call fcn.00402160
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 0x4ed0a8
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 0x4a9516
push ebx
call fcn.00406da0
call sub.msvcrt.dll__errno
add esp, 0x10
mov dword [eax], edi
mov eax, 0x4a9555
mov ecx, dword [0x4d8008]
test ecx, ecx
jne 0x4070d3
mov eax, 0x4a955c
push edx
push eax
push str.transport:_local__s_init_n
push ebx
call fcn.00406da0
mov dword [esp], ebx
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4ed0a8
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
call sub.msvcrt.dll__errno
mov dword [eax], edi
jmp 0x407036
Function at 0x4080a0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
push eax
mov eax, 0x1008
call fcn.004a0230
mov eax, dword [ebp - 0x10]
mov esi, eax
test eax, eax
js 0x40823a
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [ebp - 0x1014], eax
lea esi, [esi]
test byte [0x4ed098], 1
jne 0x408141
lea esi, [esi]
lea edx, [ebp - 0x100c]
push eax
push 0x1000
push edx
push esi
call fcn.00414910
add esp, 0x10
mov edi, eax
test byte [0x4ed098], 1
jne 0x4081b7
cmp edi, 0
je 0x40823a
jl 0x408242
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 [0x4ed098], 1
je 0x4080e0
call sub.msvcrt.dll__errno
sub esp, 0xc
mov ebx, dword [eax]
push 0x4ed0a8
call sub.KERNEL32.dll_EnterCriticalSection
add esp, 0xc
push str.read_and_dump
push str.system_core_adb_commandline.c
push 0x4abeaf
mov eax, dword [ebp - 0x1014]
push eax
call fcn.00407ec0
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.00407ec0
pop eax
mov eax, dword [ebp - 0x1014]
push eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4ed0a8
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
call sub.msvcrt.dll__errno
mov dword [eax], ebx
jmp 0x4080e0
call sub.msvcrt.dll__errno
sub esp, 0xc
mov eax, dword [eax]
mov dword [ebp - 0x1010], eax
push 0x4ed0a8
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 0x4abeaf
push ebx
call fcn.00407ec0
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.00407ec0
add esp, 0x14
push ebx
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4ed0a8
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 0x40810e
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
call sub.msvcrt.dll__errno
cmp dword [eax], 4
je 0x4080d0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x4086e0
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov eax, 0x103c
mov ebp, esp
push edi
push esi
push ebx
call fcn.004a0230
mov esi, dword [ebp + 0x14]
push esi
lea eax, [ebp - 0x1014]
mov ecx, dword [ebp + 8]
push ecx
push 0x4ac041
mov dword [ebp - 0x1044], eax
push eax
call fcn.004086c0
lea eax, [ebp - 0x1014]
mov dword [esp], eax
call fcn.0040baa0
add esp, 0x10
mov dword [ebp - 0x1028], eax
test eax, eax
js 0x40891f
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 0x408830
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 0x408797
test esi, esi
jle 0x408830
mov eax, dword [ebp - 0x1024]
add eax, edi
mov dword [ebp - 0x1024], eax
mov edi, esi
cmp esi, 0x10000
jle 0x4087a6
mov edi, 0x10000
push eax
push edi
mov eax, dword [ebp - 0x1024]
push eax
mov ebx, dword [ebp - 0x1028]
push ebx
call fcn.00405930
add esp, 0x10
test eax, eax
jne 0x408891
mov edx, dword [ebp + 0x18]
sub esi, edi
test edx, edx
je 0x408781
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.004a0260
add esp, 0x1c
sub ebx, eax
push ebx
mov eax, dword [ebp + 0xc]
push eax
push str.sending:__s__4d_______r
call fcn.00408260
pop eax
mov eax, dword [ebp - 0x1040]
push eax
call sub.msvcrt.dll_fflush
add esp, 0x10
test esi, esi
jg 0x408789
mov edi, dword [ebp + 0x18]
test edi, edi
jne 0x4088ca
lea edx, [ebp - 0x1014]
push esi
push 4
push edx
mov ebx, dword [ebp - 0x1028]
push ebx
call fcn.004053d0
add esp, 0x10
test eax, eax
jne 0x4088df
cld
mov edi, 0x4ac0aa
mov ecx, 4
mov esi, dword [ebp - 0x1044]
repe cmpsb byte [esi], byte es:[edi]
jne 0x408909
sub esp, 0xc
mov eax, dword [ebp - 0x1028]
push eax
call fcn.004147e0
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.0040b460
call fcn.0040b3f0
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.00407ec0
or eax, 0xffffffff
add esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
sub esp, 0xc
push 0x4ac08c
call fcn.00408260
add esp, 0x10
jmp 0x40883b
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.00407ec0
pop eax
mov eax, dword [ebp - 0x1028]
push eax
call fcn.004147e0
or eax, 0xffffffff
add esp, 0x10
jmp 0x408889
lea eax, [ebp - 0x1014]
mov byte [ebp - 0x1010], 0
push edx
push eax
push str._error_response__s__n
jmp 0x4088e6
call fcn.0040b3f0
push edx
push eax
push 0x4ac047
jmp 0x4088ae
Function at 0x4089a0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x10
push str.shell:
call fcn.0040baa0
add esp, 0x10
mov ebx, eax
test eax, eax
js 0x4089f0
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 0x408a20
call sub.msvcrt.dll__beginthread
mov eax, ebx
call fcn.004080a0
xor eax, eax
add esp, 0x10
mov ebx, dword [ebp - 4]
leave
ret
call fcn.0040b3f0
push edx
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
push 0x4ac047
add eax, 0x40
push eax
call fcn.00407ec0
mov eax, 1
add esp, 0x10
mov ebx, dword [ebp - 4]
leave
ret