joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4086b0
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov eax, 0x103c
mov ebp, esp
push edi
push esi
push ebx
call fcn.0049fe20
mov esi, dword [ebp + 0x14]
push esi
lea eax, [ebp - 0x1014]
mov ecx, dword [ebp + 8]
push ecx
push 0x4abd85
mov dword [ebp - 0x1044], eax
push eax
call fcn.00408690
lea eax, [ebp - 0x1014]
mov dword [esp], eax
call fcn.0040ba50
add esp, 0x10
mov dword [ebp - 0x1028], eax
test eax, eax
js 0x4088ef
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 0x408800
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 0x408767
test esi, esi
jle 0x408800
mov eax, dword [ebp - 0x1024]
add eax, edi
mov dword [ebp - 0x1024], eax
mov edi, esi
cmp esi, 0x10000
jle 0x408776
mov edi, 0x10000
push eax
push edi
mov eax, dword [ebp - 0x1024]
push eax
mov ebx, dword [ebp - 0x1028]
push ebx
call fcn.004058d0
add esp, 0x10
test eax, eax
jne 0x408861
mov edx, dword [ebp + 0x18]
sub esi, edi
test edx, edx
je 0x408751
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.0049fe50
add esp, 0x1c
sub ebx, eax
push ebx
mov eax, dword [ebp + 0xc]
push eax
push str.sending:__s__4d_______r
call fcn.00408230
pop eax
mov eax, dword [ebp - 0x1040]
push eax
call sub.msvcrt.dll_fflush
add esp, 0x10
test esi, esi
jg 0x408759
mov edi, dword [ebp + 0x18]
test edi, edi
jne 0x40889a
lea edx, [ebp - 0x1014]
push esi
push 4
push edx
mov ebx, dword [ebp - 0x1028]
push ebx
call fcn.00405370
add esp, 0x10
test eax, eax
jne 0x4088af
cld
mov edi, 0x4abdee
mov ecx, 4
mov esi, dword [ebp - 0x1044]
repe cmpsb byte [esi], byte es:[edi]
jne 0x4088d9
sub esp, 0xc
mov eax, dword [ebp - 0x1028]
push eax
call fcn.004148a0
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.0040b410
call fcn.0040b3a0
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.00407e90
or eax, 0xffffffff
add esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
sub esp, 0xc
push 0x4abdd0
call fcn.00408230
add esp, 0x10
jmp 0x40880b
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.00407e90
pop eax
mov eax, dword [ebp - 0x1028]
push eax
call fcn.004148a0
or eax, 0xffffffff
add esp, 0x10
jmp 0x408859
lea eax, [ebp - 0x1014]
mov byte [ebp - 0x1010], 0
push edx
push eax
push str._error_response__s__n
jmp 0x4088b6
call fcn.0040b3a0
push edx
push eax
push 0x4abd8b
jmp 0x40887e
Function at 0x408970
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x10
push str.shell:
call fcn.0040ba50
add esp, 0x10
mov ebx, eax
test eax, eax
js 0x4089c0
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 0x4089f0
call sub.msvcrt.dll__beginthread
mov eax, ebx
call fcn.00408070
xor eax, eax
add esp, 0x10
mov ebx, dword [ebp - 4]
leave
ret
call fcn.0040b3a0
push edx
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
push 0x4abd8b
add eax, 0x40
push eax
call fcn.00407e90
mov eax, 1
add esp, 0x10
mov ebx, dword [ebp - 4]
leave
ret
Function at 0x40c100
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 0x4acd40
call sub.msvcrt.dll_getenv
add esp, 0x10
mov edi, eax
test eax, eax
je 0x40c231
test byte [0x4ec099], 4
jne 0x40c1c3
sub esp, 0xc
push 0x4acd89
push edi
lea edi, [ebp - 0x133]
push 0x4acd92
push 0x103
push edi
call fcn.004a0540
add esp, 0x20
cmp eax, 0x102
jle 0x40c170
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 0x40c197
sub esp, 0xc
push edi
call sub.msvcrt.dll__mkdir
add esp, 0x10
test eax, eax
js 0x40c252
sub esp, 0xc
push str.adbkey
push edi
push 0x4acd92
mov ebx, dword [ebp - 0x244]
push ebx
mov ecx, dword [ebp - 0x240]
push ecx
call fcn.004a0540
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 0x4ec0a8
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 0x4acd74
push ebx
call fcn.0040c0e0
call sub.msvcrt.dll__errno
add esp, 0xc
mov dword [eax], esi
push edi
push str.home__s_n
push ebx
call fcn.0040c0e0
mov dword [esp], ebx
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4ec0a8
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
call sub.msvcrt.dll__errno
mov dword [eax], esi
jmp 0x40c13c
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 0x40c12f
test byte [0x4ec099], 4
je 0x40c165
call sub.msvcrt.dll__errno
sub esp, 0xc
mov esi, dword [eax]
push 0x4ec0a8
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 0x4acd74
push ebx
call fcn.0040c0e0
call sub.msvcrt.dll__errno
add esp, 0xc
mov dword [eax], esi
push edi
push str.Cannot_mkdir__s
push ebx
call fcn.0040c0e0
mov dword [esp], ebx
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4ec0a8
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
call sub.msvcrt.dll__errno
mov dword [eax], esi
or eax, 0xffffffff
jmp 0x40c168
Function at 0x40fe20
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.00416460
add esp, 0x10
test eax, eax
jne 0x40ff15
sub esp, 0xc
push 0xc
call sub.msvcrt.dll_malloc
add esp, 0x10
mov ebx, eax
test eax, eax
je 0x40ff00
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 0x40fdb0
call sub.msvcrt.dll__beginthread
add esp, 0x10
inc eax
je 0x40ff2d
test byte [0x4ec099], 2
jne 0x40fe90
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 0x4ec0a8
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 0x4ada73
push ebx
call fcn.0040fe00
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.0040fe00
add esp, 0x14
push ebx
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4ec0a8
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
call sub.msvcrt.dll__errno
mov dword [eax], esi
jmp 0x40fe84
sub esp, 0xc
push str.cannot_allocate_stinfo
call fcn.00402280
add esp, 0x10
jmp 0x40fe58
sub esp, 0xc
push str.cannot_create_service_socket_pair_n
call fcn.0040fde0
or eax, 0xffffffff
add esp, 0x10
jmp 0x40fe87
sub esp, 0xc
push ebx
call sub.msvcrt.dll_free
pop ecx
mov edx, dword [ebp - 0x14]
push edx
call fcn.004148a0
pop eax
mov eax, dword [ebp - 0x10]
push eax
call fcn.004148a0
mov dword [esp], str.cannot_create_service_thread_n
call fcn.0040fde0
or eax, 0xffffffff
add esp, 0x10
jmp 0x40fe87
Function at 0x412920
Capabilities:
Create thread

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

Function at 0x413500
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 0x413536
push eax
mov ebx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
push str._s_s_s
push eax
push ebx
call fcn.004134c0
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 0x41351c
Function at 0x415800
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
call fcn.004146d0
mov edx, eax
test eax, eax
je 0x415823
mov dword [ebp - 4], 1
cmp dword [eax], 0x4aee3c
je 0x415825
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 0x415d30
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x198
mov eax, dword [0x4e9018]
test eax, eax
je 0x415d44
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 0x415d80
sub esp, 0xc
push 0x415da0
call section..text
mov dword [0x4e9018], 1
add esp, 0x10
leave
ret
sub esp, 0xc
push str.adb:_could_not_initialize_Winsock_n
call fcn.00402280
add esp, 0x10
jmp 0x415d5d
Function at 0x415db0
Capabilities:
Resolve dns

Disassembly:
push ebp
mov eax, 0x4aee3c
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x1c
mov edi, dword [ebp + 0x10]
call fcn.004145b0
mov esi, eax
or eax, 0xffffffff
test esi, esi
je 0x415ebc
mov edx, dword [0x4e9018]
test edx, edx
je 0x415ec4
sub esp, 0xc
mov eax, dword [ebp + 8]
push eax
call sub.WS2_32.DLL_gethostbyname
add esp, 0xc
mov ebx, eax
test eax, eax
je 0x415f73
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0
mov eax, dword [eax + 8]
sub esp, 0xc
mov word [ebp - 0x1c], ax
mov eax, dword [ebp + 0xc]
and eax, 0xffff
push eax
call sub.WS2_32.DLL_htons
mov word [ebp - 0x1a], ax
sub esp, 8
movsx eax, word [ebx + 0xa]
mov edx, dword [ebx + 0xc]
push eax
lea ecx, [ebp - 0x18]
mov eax, dword [edx]
push eax
push ecx
call sub.msvcrt.dll_memcpy
add esp, 0x1c
push 0
push edi
movsx eax, word [ebx + 8]
push eax
call sub.WS2_32.DLL_socket
pop edx
cmp eax, 0xffffffff
je 0x415f73
mov dword [esi + 0xc], eax
lea edx, [ebp - 0x1c]
push ebx
push 0x10
push edx
push eax
call sub.WS2_32.DLL_connect
pop ecx
test eax, eax
js 0x415f73
mov eax, str.udp:
cmp edi, 1
je 0x415f62
mov ebx, dword [ebp + 0xc]
push edx
push edx
push ebx
push eax
mov eax, esi
call fcn.00413680
push eax
lea eax, [esi + 0x18]
push str._d_net_client:_s_d_
push 0x20
push eax
call fcn.004a0540
add esp, 0x20
cmp byte [0x4ec098], 0
js 0x415ed0
mov eax, esi
call fcn.00413680
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
call fcn.00415d30
jmp 0x415de1
call sub.msvcrt.dll__errno
sub esp, 0xc
mov eax, dword [eax]
push 0x4ec0a8
mov dword [ebp - 0x20], eax
call sub.KERNEL32.dll_EnterCriticalSection
mov ebx, dword [sym.imp.msvcrt.dll__iob]
add esp, 0xc
add ebx, 0x40
push str.socket_network_client
push str.system_core_adb_sysdeps_win32.c
push str._s::_s__:
push ebx
call fcn.00413b80
call sub.msvcrt.dll__errno
mov edx, dword [ebp - 0x20]
mov dword [eax], edx
mov eax, esi
call fcn.00413680
add esp, 0x10
mov edx, 0x4ae831
dec edi
je 0x415f6c
push ecx
push ecx
push eax
mov eax, dword [ebp + 0xc]
push edx
push eax
mov eax, dword [ebp + 8]
push eax
push str.socket_network_client:_host__s_port__d_type__s___fd__d_n
push ebx
call fcn.00413b80
add esp, 0x14
push ebx
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4ec0a8
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
call sub.msvcrt.dll__errno
mov edx, dword [ebp - 0x20]
mov dword [eax], edx
jmp 0x415eb5
mov eax, 0x4ae81c
jmp 0x415e8a
mov edx, 0x4ae835
jmp 0x415f24
mov eax, esi
call fcn.004136d0
or eax, 0xffffffff
jmp 0x415ebc

Function at 0x415f90
Capabilities:
Connect socket
Resolve dns

Disassembly:
push ebp
mov ebp, esp
pop ebp
jmp fcn.00415db0
Function at 0x416020
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x30
mov eax, dword [ebp + 8]
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push eax
call sub.KERNEL32.dll_CreateFileA
mov esi, eax
pop eax
xor eax, eax
cmp esi, 0xffffffff
je 0x416072
push edi
push edi
push 0
push esi
call sub.KERNEL32.dll_GetFileSize
pop ecx
mov edi, eax
pop ebx
xor ebx, ebx
test eax, eax
jne 0x416080
sub esp, 0xc
push esi
call sub.KERNEL32.dll_CloseHandle
mov eax, dword [ebp + 0xc]
add esp, 0xc
mov dword [eax], edi
mov eax, ebx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
sub esp, 0xc
lea eax, [eax + 1]
push eax
call sub.msvcrt.dll_malloc
add esp, 0x10
mov ebx, eax
test eax, eax
je 0x4160d1
sub esp, 0xc
lea eax, [ebp - 0x10]
push 0
push eax
push edi
push ebx
push esi
call sub.KERNEL32.dll_ReadFile
add esp, 0xc
test eax, eax
je 0x4160b2
cmp edi, dword [ebp - 0x10]
je 0x41605f
cmp byte [0x4ec098], 0
js 0x41615e
sub esp, 0xc
xor edi, edi
push ebx
call sub.msvcrt.dll_free
xor ebx, ebx
add esp, 0x10
jmp 0x41605f
cmp byte [0x4ec098], 0
js 0x4160de
xor edi, edi
jmp 0x41605f
call sub.msvcrt.dll__errno
sub esp, 0xc
mov eax, dword [eax]
push 0x4ec0a8
mov dword [ebp - 0x28], eax
call sub.KERNEL32.dll_EnterCriticalSection
mov eax, dword [sym.imp.msvcrt.dll__iob]
add esp, 0xc
add eax, 0x40
push str.load_file
mov dword [ebp - 0x2c], eax
push str.system_core_adb_sysdeps_win32.c
push str._s::_s__:
push eax
call fcn.00413b80
call sub.msvcrt.dll__errno
mov edx, dword [ebp - 0x28]
add esp, 0xc
mov dword [eax], edx
mov edx, dword [ebp - 0x2c]
push edi
push str.load_file:_could_not_allocate__ld_bytes_n
push edx
call fcn.00413b80
pop eax
mov eax, dword [ebp - 0x2c]
xor edi, edi
push eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4ec0a8
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
call sub.msvcrt.dll__errno
mov edx, dword [ebp - 0x28]
mov dword [eax], edx
jmp 0x41605f
call sub.msvcrt.dll__errno
sub esp, 0xc
mov eax, dword [eax]
push 0x4ec0a8
mov dword [ebp - 0x24], eax
call sub.KERNEL32.dll_EnterCriticalSection
mov eax, dword [sym.imp.msvcrt.dll__iob]
add esp, 0xc
add eax, 0x40
push str.load_file
mov dword [ebp - 0x20], eax
push str.system_core_adb_sysdeps_win32.c
push str._s::_s__:
push eax
call fcn.00413b80
call sub.msvcrt.dll__errno
mov edx, dword [ebp - 0x24]
mov dword [eax], edx
mov eax, dword [ebp + 8]
push eax
mov eax, dword [ebp - 0x20]
push edi
push str.load_file:_could_not_read__ld_bytes_from__s_n
push eax
call fcn.00413b80
add esp, 0x14
mov eax, dword [ebp - 0x20]
push eax
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4ec0a8
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
call sub.msvcrt.dll__errno
mov edx, dword [ebp - 0x24]
mov dword [eax], edx
jmp 0x4160bf
Function at 0x4168c0
Capabilities:
Create udp socket
Set socket configuration

Disassembly:
push ebp
mov eax, 0x4aee3c
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x2c
mov edi, dword [ebp + 0xc]
call fcn.004145b0
mov esi, eax
or eax, 0xffffffff
test esi, esi
je 0x4169c4
mov eax, dword [0x4e9018]
test eax, eax
je 0x4169d0
sub esp, 0xc
mov eax, dword [ebp + 8]
and eax, 0xffff
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov word [ebp - 0x20], 2
push eax
call sub.WS2_32.DLL_htons
mov word [ebp - 0x1e], ax
push 0
call sub.WS2_32.DLL_htonl
mov dword [ebp - 0x1c], eax
push eax
push eax
push 0
push edi
push 2
call sub.WS2_32.DLL_socket
add esp, 0x14
mov ebx, eax
cmp eax, 0xffffffff
je 0x416a89
sub esp, 0xc
mov dword [esi + 0xc], eax
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 1
push 4
push eax
push 0xfffffffffffffffb
push 0xffff
push ebx
call sub.WS2_32.DLL_setsockopt
push eax
push eax
lea eax, [ebp - 0x20]
push 0x10
push eax
push ebx
call sub.WS2_32.DLL_bind
add esp, 0x14
test eax, eax
js 0x416a89
mov edx, str.udp:
cmp edi, 1
je 0x416a70
push eax
push eax
mov eax, dword [ebp + 8]
push eax
mov eax, esi
push edx
call fcn.00413680
push eax
lea eax, [esi + 0x18]
push str._d_any_server:_s_d_
push 0x20
push eax
call fcn.004a0540
add esp, 0x20
cmp byte [0x4ec098], 0
js 0x4169e0
mov eax, esi
call fcn.00413680
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
call fcn.00415d30
jmp 0x4168f0
call sub.msvcrt.dll__errno
sub esp, 0xc
mov eax, dword [eax]
push 0x4ec0a8
mov dword [ebp - 0x30], eax
call sub.KERNEL32.dll_EnterCriticalSection
mov ebx, dword [sym.imp.msvcrt.dll__iob]
add esp, 0xc
add ebx, 0x40
push str.socket_inaddr_any_server
push str.system_core_adb_sysdeps_win32.c
push str._s::_s__:
push ebx
call fcn.00413b80
call sub.msvcrt.dll__errno
mov edx, dword [ebp - 0x30]
mov dword [eax], edx
mov eax, esi
call fcn.00413680
add esp, 0x10
mov edx, 0x4ae831
dec edi
je 0x416a98
sub esp, 0xc
mov edi, dword [ebp + 8]
push eax
push edx
push edi
push str.socket_inaddr_server:_port__d_type__s___fd__d_n
push ebx
call fcn.00413b80
add esp, 0x14
push ebx
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4ec0a8
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
call sub.msvcrt.dll__errno
mov edx, dword [ebp - 0x30]
mov dword [eax], edx
jmp 0x4169bd
push eax
push eax
push 4
push ebx
call sub.WS2_32.DLL_listen
pop edx
test eax, eax
pop ecx
mov edx, 0x4ae81c
jns 0x416992
mov eax, esi
call fcn.004136d0
or eax, 0xffffffff
jmp 0x4169c4
mov edx, 0x4ae835
jmp 0x416a34
Function at 0x416aa0
Capabilities:
Create udp socket
Set socket configuration

Disassembly:
push ebp
mov eax, 0x4aee3c
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x2c
call fcn.004145b0
mov ebx, eax
test eax, eax
jne 0x416ac4
or eax, 0xffffffff
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [0x4e9018]
test eax, eax
je 0x416bb0
sub esp, 0xc
mov eax, dword [ebp + 8]
mov dword [ebp - 0x20], 0
and eax, 0xffff
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov word [ebp - 0x20], 2
push eax
call sub.WS2_32.DLL_htons
mov word [ebp - 0x1e], ax
lea edi, [ebp - 0x20]
push 0x7f000001
call sub.WS2_32.DLL_htonl
mov dword [ebp - 0x1c], eax
push eax
push eax
push 0
mov eax, dword [ebp + 0xc]
push eax
push 2
call sub.WS2_32.DLL_socket
add esp, 0x14
mov esi, eax
cmp eax, 0xffffffff
je 0x416ab9
sub esp, 0xc
mov dword [ebx + 0xc], eax
mov dword [ebp - 0x10], 1
lea eax, [ebp - 0x10]
push 4
push eax
push 0xfffffffffffffffb
push 0xffff
push esi
call sub.WS2_32.DLL_setsockopt
push eax
push eax
push 0x10
push edi
push esi
call sub.WS2_32.DLL_bind
add esp, 0x14
test eax, eax
js 0x416c5c
mov edx, str.udp:
cmp dword [ebp + 0xc], 1
je 0x416c43
push ecx
push ecx
mov eax, dword [ebp + 8]
push eax
mov eax, ebx
push edx
call fcn.00413680
push eax
lea eax, [ebx + 0x18]
push str._d_lo_server:_s_d_
push 0x20
push eax
call fcn.004a0540
add esp, 0x20
cmp byte [0x4ec098], 0
js 0x416bba
mov eax, ebx
call fcn.00413680
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
call fcn.00415d30
jmp 0x416ad1
call sub.msvcrt.dll__errno
sub esp, 0xc
mov edi, dword [eax]
push 0x4ec0a8
call sub.KERNEL32.dll_EnterCriticalSection
mov esi, dword [sym.imp.msvcrt.dll__iob]
add esp, 0xc
add esi, 0x40
push str.socket_loopback_server
push str.system_core_adb_sysdeps_win32.c
push str._s::_s__:
push esi
call fcn.00413b80
call sub.msvcrt.dll__errno
mov dword [eax], edi
mov eax, ebx
call fcn.00413680
add esp, 0x10
mov edx, 0x4ae831
cmp dword [ebp + 0xc], 1
je 0x416c70
sub esp, 0xc
push eax
push edx
mov eax, dword [ebp + 8]
push eax
push str.socket_loopback_server:_port__d_type__s___fd__d_n
push esi
call fcn.00413b80
add esp, 0x14
push esi
call sub.msvcrt.dll_fflush
mov dword [esp], 0x4ec0a8
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
call sub.msvcrt.dll__errno
mov dword [eax], edi
jmp 0x416ba1
push eax
push eax
push 4
push esi
call sub.WS2_32.DLL_listen
mov edx, 0x4ae81c
pop esi
test eax, eax
pop edi
jns 0x416b76
mov eax, ebx
call fcn.004136d0
or eax, 0xffffffff
jmp 0x416abc
mov edx, 0x4ae835
jmp 0x416c0b
Function at 0x41efe0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xc]
test ecx, ecx
je 0x41f014
mov edx, dword [ebp + 0xc]
test edx, edx
je 0x41f014
mov eax, dword [eax + 0x20]
mov ecx, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 0x10]
push 1
push eax
push ecx
call sub.msvcrt.dll_fwrite
add esp, 0x10
mov edx, dword [ebp + 0x10]
test eax, eax
jne 0x41f016
xor edx, edx
mov eax, edx
leave
ret

Function at 0x41f090
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x28
mov edi, dword [ebp + 8]
push edi
call sub.msvcrt.dll_strlen
pop ebx
pop esi
lea esi, [eax + 1]
push 0
push 0
push esi
push edi
push 8
push 0xfde9
call sub.KERNEL32.dll_MultiByteToWideChar
mov edx, eax
pop eax
test edx, edx
pop ecx
mov ecx, 8
jle 0x41f201
lea eax, [edx + edx + 0x1e]
and eax, 0xfffffff0
call fcn.0049fe20
lea ebx, [esp + 0xf]
push eax
and ebx, 0xfffffff0
push eax
push edx
push ebx
push esi
push edi
push ecx
push 0xfde9
call sub.KERNEL32.dll_MultiByteToWideChar
pop edx
test eax, eax
pop ecx
jne 0x41f180
call sub.KERNEL32.dll_GetLastError
sub esp, 0xc
push 0xa9
push 0x4b20f8
push eax
push 1
push 2
call fcn.004249c0
add esp, 0x18
mov eax, dword [ebp + 0xc]
push 0x4b211f
push eax
push 0x4b2122
push edi
push str.fopen_
push 5
call fcn.00424600
add esp, 0x20
call sub.msvcrt.dll__errno
cmp dword [eax], 2
je 0x41f166
sub esp, 0xc
push 0xae
push 0x4b20f8
push 2
push 0x6d
push 0x20
xor ebx, ebx
call fcn.004249c0
add esp, 0x20
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
sub esp, 0xc
push 0xac
push 0x4b20f8
push pe_nt_image_headers32
jmp 0x41f14e
lea esi, [ebp - 0x1c]
push eax
push eax
push 8
push esi
mov eax, dword [ebp + 0xc]
sub esp, 0xc
push eax
call sub.msvcrt.dll_strlen
add esp, 0x10
inc eax
push eax
mov eax, dword [ebp + 0xc]
push eax
push 0
push 0xfde9
call sub.KERNEL32.dll_MultiByteToWideChar
pop edx
test eax, eax
pop ecx
je 0x41f0f8
push ecx
push ecx
push esi
push ebx
call sub.msvcrt.dll__wfopen
add esp, 0x10
mov esi, eax
test eax, eax
je 0x41f25a
sub esp, 0xc
call fcn.0041eb20
push eax
call fcn.0041fc80
add esp, 0x10
mov ebx, eax
test eax, eax
je 0x41f274
push eax
push eax
push 0
push ebx
call fcn.0041f290
push esi
push 1
push 0x6a
push ebx
call fcn.0041f590
add esp, 0x20
jmp 0x41f15c
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x3ec
je 0x41f237
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x459
jne 0x41f0f8
mov eax, dword [ebp + 0xc]
push edx
push edx
push eax
push edi
call sub.msvcrt.dll_fopen
add esp, 0x10
mov esi, eax
test eax, eax
jne 0x41f1c9
jmp 0x41f0f8
push ebx
push ebx
push 0
push 0
push esi
push edi
push 0
push 0xfde9
call sub.KERNEL32.dll_MultiByteToWideChar
mov edx, eax
pop eax
test edx, edx
pop ecx
jle 0x41f20d
xor ecx, ecx
jmp 0x41f0ca
call sub.msvcrt.dll__errno
cmp dword [eax], 2
je 0x41f21d
call sub.msvcrt.dll__errno
cmp dword [eax], 9
jne 0x41f0f8
jmp 0x41f21d
sub esp, 0xc
push esi
call sub.msvcrt.dll_fclose
add esp, 0x10
jmp 0x41f15c