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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.0045a200
mov eax, dword [0x480160]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov esi, ecx
push esi
push str.sideload
lea eax, [ebp - 0x1008]
push str._s:_d
push eax
mov ebx, edx
mov dword [ebp - 0x1010], str.sideload
call dword [sym.imp.MSVCR100.dll_sprintf]
lea ecx, [ebp - 0x1008]
push ecx
call fcn.004057d0
mov edi, eax
add esp, 0x14
mov dword [ebp - 0x100c], edi
test edi, edi
jns 0x4065cc
push 0x4936f0
push str.error:__s_n
call dword [sym.imp.MSVCR100.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fprintf]
add esp, 0xc
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00459ce1
mov esp, ebp
pop ebp
ret
push 4
lea edx, [ebp - 0x1014]
push edx
push 0x1001
push 0xffff
push edi
mov dword [ebp - 0x1014], 0x10000
call dword [sym.imp.WS2_32.dll_setsockopt]
push 0x3a
push str.sideload
mov dword [ebp - 0x1014], eax
mov dword [ebp - 0x1018], esi
call dword [sym.imp.MSVCR100.dll_strrchr]
add esp, 8
test eax, eax
je 0x406617
inc eax
mov dword [ebp - 0x1010], eax
test esi, esi
jle 0x4066a3
mov edi, 0x10000
cmp esi, 0x10000
jg 0x40662e
mov edi, esi
mov eax, dword [ebp - 0x100c]
push edi
push ebx
push eax
call fcn.00415b90
add esp, 0xc
test eax, eax
jne 0x4066e1
sub esi, edi
push 0
mov eax, esi
cdq
push 0x64
push edx
push eax
add ebx, edi
call fcn.0045a250
mov ecx, dword [ebp - 0x1018]
push 0
push ecx
push edx
push eax
call fcn.0045aa30
mov edx, 0x64
sub edx, eax
mov eax, dword [ebp - 0x1010]
push edx
push eax
push str.sending:__s__4d_______r
call dword [sym.imp.MSVCR100.dll_printf]
add esp, 0xc
call dword [sym.imp.MSVCR100.dll___iob_func]
add eax, 0x20
push eax
call dword [sym.imp.MSVCR100.dll_fflush]
add esp, 4
test esi, esi
jg 0x40661f
mov edi, dword [ebp - 0x100c]
push 0x46e578
call dword [sym.imp.MSVCR100.dll_printf]
add esp, 4
push 4
lea ecx, [ebp - 0x1008]
push ecx
push edi
call fcn.00415900
add esp, 0xc
test eax, eax
je 0x4066fb
push str._error_reading_response__n
call dword [sym.imp.MSVCR100.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fprintf]
add esp, 8
jmp 0x406747
mov ecx, dword [ebp - 0x100c]
call fcn.004053f0
push 0x4936f0
push str._failed_to_write_data__s__n
jmp 0x4065a5
cmp dword [ebp - 0x1008], 0x59414b4f
jne 0x406721
mov eax, edi
call fcn.0040ff10
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00459ce1
mov esp, ebp
pop ebp
ret
lea edx, [ebp - 0x1008]
push edx
push str._error_response__s__n
mov byte [ebp - 0x1004], 0
call dword [sym.imp.MSVCR100.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fprintf]
add esp, 0xc
mov eax, edi
call fcn.0040ff10
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
or eax, 0xffffffff
pop ebx
call fcn.00459ce1
mov esp, ebp
pop ebp
ret
Function at 0x406980
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1010
call fcn.0045a200
mov eax, dword [0x480160]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
push str.ANDROID_LOG_TAGS
mov ebx, ecx
call dword [sym.imp.MSVCR100.dll_getenv]
add esp, 4
test eax, eax
jne 0x4069b3
mov eax, 0x46f8ad
call fcn.00406910
mov esi, eax
push esi
push str.shell:export_ANDROID_LOG_TAGS__s____exec_logcat
lea eax, [ebp - 0x100c]
push 0x1000
push eax
call dword [sym.imp.MSVCR100.dll__snprintf]
push esi
call dword [sym.imp.MSVCR100.dll_free]
mov eax, dword [ebx]
add esp, 0x14
mov esi, str.longcat
mov cl, byte [eax]
cmp cl, byte [esi]
jne 0x406a03
test cl, cl
je 0x4069ff
mov cl, byte [eax + 1]
cmp cl, byte [esi + 1]
jne 0x406a03
add eax, 2
add esi, 2
test cl, cl
jne 0x4069e3
xor eax, eax
jmp 0x406a08
sbb eax, eax
sbb eax, 0xffffffff
mov edi, dword [sym.imp.MSVCR100.dll_strncat]
test eax, eax
jne 0x406a28
push 0xfff
lea ecx, [ebp - 0x100c]
push str.__v_long
push ecx
call edi
add esp, 0xc
mov eax, dword [ebp + 8]
dec eax
add ebx, 4
mov dword [ebp + 8], eax
test eax, eax
jle 0x406a7d
mov eax, dword [ebx]
dec dword [ebp + 8]
call fcn.00406910
push 0xfff
lea edx, [ebp - 0x100c]
push 0x46f8f8
push edx
mov esi, eax
add ebx, 4
call edi
add esp, 0xc
push 0xfff
lea eax, [ebp - 0x100c]
push esi
push eax
call edi
add esp, 0xc
push esi
call dword [sym.imp.MSVCR100.dll_free]
add esp, 4
cmp dword [ebp + 8], 0
jg 0x406a36
lea ecx, [ebp - 0x100c]
push ecx
call fcn.004057d0
mov esi, eax
add esp, 4
test esi, esi
js 0x406ab4
push esi
call fcn.00405d10
add esp, 4
mov eax, esi
call fcn.0040ff10
test eax, eax
je 0x406ab4
push str.close
call dword [sym.imp.MSVCR100.dll_perror]
add esp, 4
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.00459ce1
mov esp, ebp
pop ebp
ret
Function at 0x407000
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x480160]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
mov edi, dword [sym.imp.MSVCR100.dll_getenv]
push str.ANDROID_BUILD_TOP
call edi
mov esi, eax
add esp, 4
test esi, esi
je 0x407064
cmp byte [esi], 0
je 0x407064
call fcn.00406e90
test eax, eax
jne 0x40708a
push esi
push str.adb:_bad_ANDROID_BUILD_TOP_value___s__n
call dword [sym.imp.MSVCR100.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fprintf]
add esp, 0xc
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00459ce1
mov esp, ebp
pop ebp
ret
push 0x46fa74
call edi
mov esi, eax
add esp, 4
test esi, esi
je 0x4070ac
cmp byte [esi], 0
je 0x4070ac
call fcn.00406e90
test eax, eax
jne 0x40708a
push esi
push str.adb:_bad_TOP_value___s__n
jmp 0x40703f
mov edx, ebx
mov eax, esi
sub edx, esi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x407090
pop edi
mov eax, ebx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00459ce1
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x108]
push 0x104
push eax
call dword [sym.imp.MSVCR100.dll__getcwd]
push eax
mov esi, ebx
call fcn.00406f20
add esp, 0xc
test eax, eax
jne 0x407115
push 0x104
lea ecx, [ebp - 0x108]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x4070ff
lea edx, [ebp - 0x108]
push 0x5c
push edx
call dword [sym.imp.MSVCR100.dll_strrchr]
add esp, 8
test eax, eax
je 0x407106
mov byte [eax], 0
jmp 0x407106
mov byte [ebp - 0x108], 0
lea eax, [ebp - 0x108]
push eax
call fcn.00406f20
add esp, 4
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.00459ce1
mov esp, ebp
pop ebp
ret
Function at 0x409c10
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
xor edi, edi
push esi
mov dword [ebp - 8], edi
call fcn.0040f7a0
add esp, 4
mov dword [ebp - 4], eax
cmp eax, edi
jge 0x409c67
call dword [sym.imp.MSVCR100.dll__errno]
mov eax, dword [eax]
push eax
call dword [sym.imp.MSVCR100.dll_strerror]
add esp, 4
push eax
push esi
push str.cannot_open__s:__s_n
call dword [sym.imp.MSVCR100.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fprintf]
add esp, 0x10
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push eax
call fcn.0040f2b0
mov edx, dword [eax + 0xc]
add esp, 4
lea ecx, [ebp - 0x10]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x409c8a
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x14], edi
jmp 0x409c96
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], ecx
xor ebx, ebx
mov dword [ebp - 0xc], edi
mov dword [0x4815c8], 0x41544144
mov edx, dword [ebp - 4]
push edx
call fcn.0040f2b0
add esp, 4
test eax, eax
je 0x409cd2
mov ecx, dword [eax]
mov edx, dword [ecx + 0xc]
push 0x10000
push 0x4815d0
push eax
call edx
mov esi, eax
add esp, 0xc
test esi, esi
je 0x409d0a
jns 0x409d2e
mov esi, dword [sym.imp.MSVCR100.dll__errno]
call esi
cmp dword [eax], 4
je 0x409ca5
call esi
mov eax, dword [eax]
push eax
call dword [sym.imp.MSVCR100.dll_strerror]
mov ecx, dword [ebp + 0xc]
add esp, 4
push eax
push ecx
push str.cannot_read__s:__s_n
call dword [sym.imp.MSVCR100.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fprintf]
add esp, 0x10
mov edx, dword [ebp + 0xc]
push edx
push str.__s____100___n
call dword [sym.imp.MSVCR100.dll_printf]
mov eax, dword [ebp - 4]
add esp, 8
call fcn.0040ff10
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 8]
lea eax, [esi + 8]
push eax
push 0x4815c8
push ecx
mov dword [0x4815cc], esi
call fcn.00415b90
add esp, 0xc
test eax, eax
jne 0x409d95
add dword [0x4815c4], esi
mov eax, esi
cdq
inc edi
add ebx, eax
adc dword [ebp - 0xc], edx
mov dword [ebp - 0x10], ebx
cmp edi, 0x14
jne 0x409ca5
fild qword [ebp - 0x10]
mov edx, dword [ebp + 0xc]
fild qword [ebp - 0x18]
sub esp, 8
xor edi, edi
fdivp st(1)
fmul qword [0x473078]
fstp qword [esp]
push edx
push str.__s_____4.2f___n
call dword [sym.imp.MSVCR100.dll_printf]
add esp, 0x10
jmp 0x409ca5
mov eax, dword [ebp - 4]
mov dword [ebp - 8], 0xffffffff
call fcn.0040ff10
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40a030
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [sym.imp.MSVCR100.dll_strchr]
push esi
push edi
mov edi, dword [ebp + 8]
inc edi
push 0x2f
push edi
call ebx
push 0x5c
push edi
mov esi, eax
call ebx
add esp, 0x10
test esi, esi
je 0x40a05b
test eax, eax
je 0x40a05d
cmp eax, esi
jbe 0x40a05d
mov esi, eax
test esi, esi
je 0x40a08a
mov eax, dword [ebp + 8]
push eax
mov byte [esi], 0
call dword [sym.imp.MSVCR100.dll__mkdir]
mov edi, eax
add esp, 4
mov byte [esi], 0x5c
test edi, edi
jns 0x40a085
call dword [sym.imp.MSVCR100.dll__errno]
cmp dword [eax], 0x11
jne 0x40a091
lea edi, [esi + 1]
jmp 0x40a040
pop edi
pop esi
xor eax, eax
pop ebx
pop ebp
ret
mov eax, edi
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x40c030
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov eax, dword [0x480160]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
push 0x470608
push eax
mov esi, ecx
call dword [sym.imp.MSVCR100.dll_fopen]
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x40c072
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00459ce1
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [esi + 0xc]
mov eax, dword [esi + 0x10]
mov edi, ecx
imul edi, eax
add edi, edi
add edi, edi
mov edx, 0x4d42
mov word [ebp - 0x18], dx
lea edx, [edi + 0x36]
mov dword [ebp - 0x16], edx
xor edx, edx
push edi
mov dword [ebp - 0x12], edx
mov dword [ebp - 0xe], 0x36
mov dword [ebp - 0x40], 0x28
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], 0x180001
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x1c], edx
call dword [sym.imp.MSVCR100.dll_void____cdecl_operator_new___unsigned_int_]
add esp, 4
cmp byte [esi + 0x34], 0
mov dword [ebp - 0x44], eax
je 0x40c0e0
mov edx, dword [esi + 0x38]
push edx
call fcn.0040bea0
jmp 0x40c0e9
mov ecx, dword [esi + 0x38]
push ecx
call fcn.0040bd10
mov esi, dword [sym.imp.MSVCR100.dll_fwrite]
push ebx
push 1
lea edx, [ebp - 0x18]
push 0xe
push edx
call esi
push ebx
push 1
lea eax, [ebp - 0x40]
push 0x28
push eax
call esi
push ebx
push 1
push edi
mov edi, dword [ebp - 0x44]
push edi
call esi
push edi
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete___void__]
push ebx
call dword [sym.imp.MSVCR100.dll_fclose]
mov ecx, dword [ebp - 8]
add esp, 0x38
pop edi
pop esi
xor ecx, ebp
mov al, 1
pop ebx
call fcn.00459ce1
mov esp, ebp
pop ebp
ret 4
Function at 0x40c1e0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
lea eax, [ebp - 8]
call fcn.004113d0
test eax, eax
je 0x40c207
push str.cannot_create_service_socket_pair_n
call dword [sym.imp.MSVCR100.dll_printf]
add esp, 4
or eax, 0xffffffff
mov esp, ebp
pop ebp
ret
push esi
push 0xc
call dword [sym.imp.MSVCR100.dll_malloc]
mov esi, eax
add esp, 4
test esi, esi
jne 0x40c223
push str.cannot_allocate_stinfo
call fcn.00401000
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
push edi
mov edi, dword [ebp - 4]
push esi
push 0
push 0x40c140
mov dword [esi], eax
mov dword [esi + 8], ecx
mov dword [esi + 4], edi
call dword [sym.imp.MSVCR100.dll__beginthread]
add esp, 0xc
cmp eax, 0xffffffff
jne 0x40c278
push esi
call dword [sym.imp.MSVCR100.dll_free]
mov eax, dword [ebp - 8]
call fcn.0040ff10
mov eax, edi
call fcn.0040ff10
push str.cannot_create_service_thread_n
call dword [sym.imp.MSVCR100.dll_printf]
add esp, 8
pop edi
or eax, 0xffffffff
pop esi
mov esp, ebp
pop ebp
ret
test dword [0x4815b8], 0x200
je 0x40c2fa
mov esi, dword [sym.imp.MSVCR100.dll__errno]
push ebx
call esi
mov edi, dword [eax]
push 0x4815a0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [sym.imp.MSVCR100.dll___iob_func]
push str.create_service_thread
push str.services.cpp
push str._s::_s__:
call ebx
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fprintf]
add esp, 0x10
call esi
mov edx, dword [ebp - 4]
mov dword [eax], edi
mov eax, dword [ebp - 8]
push edx
push eax
push str.service_thread_started___d:_d_n
call ebx
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fprintf]
call ebx
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fflush]
add esp, 0x14
push 0x4815a0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call esi
mov dword [eax], edi
pop ebx
mov eax, dword [ebp - 8]
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x40c310
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push ecx
push ebx
mov ebx, dword [sym.imp.MSVCR100.dll_strncmp]
push esi
push edi
push 4
mov edi, eax
push str.tcp:
push edi
or esi, 0xffffffff
call ebx
add esp, 0xc
test eax, eax
jne 0x40c3d6
lea esi, [edi + 4]
push esi
call dword [sym.imp.MSVCR100.dll_atoi]
add esp, 4
push 0x3a
push esi
mov edi, eax
call dword [sym.imp.MSVCR100.dll_strchr]
mov esi, eax
add esp, 8
test esi, esi
jne 0x40c3a9
push edi
call fcn.00410220
mov esi, eax
add esp, 4
test esi, esi
js 0x40c412
push esi
call fcn.0040f2b0
add esp, 4
test eax, eax
je 0x40c412
cmp dword [eax], 0x4710f8
jne 0x40c412
mov edx, dword [eax + 0xc]
push 4
lea ecx, [esp + 0x10]
push ecx
push 1
push 6
push edx
call dword [sym.imp.WS2_32.dll_setsockopt]
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x4915d8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push edi
lea ecx, [esi + 1]
call fcn.004106d0
add esp, 4
push 0x4915d8
mov esi, eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 4
push edi
push str.dns:
call ebx
add esp, 0xc
test eax, eax
jne 0x40c412
add edi, 4
push edi
call dword [sym.imp.MSVCR100.dll__strdup]
add esp, 4
test eax, eax
jne 0x40c402
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push eax
push 0x40c170
call fcn.0040c1e0
add esp, 8
mov esi, eax
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40f100
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ebp + 8]
push ebx
push 0
push 0
push 3
push 0
push 1
push accept
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
mov dword [ebp - 8], ebx
cmp ebx, 0xffffffff
jne 0x40f131
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
push esi
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
mov dword [ebp - 4], 0
test esi, esi
je 0x40f29b
lea ecx, [esi + 1]
push edi
push ecx
call dword [sym.imp.MSVCR100.dll_malloc]
mov edi, eax
add esp, 4
mov dword [ebp - 4], edi
test edi, edi
jne 0x40f1eb
test byte [0x4815b8], 0x80
je 0x40f1e4
mov edi, dword [sym.imp.MSVCR100.dll__errno]
call edi
mov ebx, dword [eax]
push 0x4815a0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push str.load_file
push str.sysdeps_win32.cpp
push str._s::_s__:
call dword [sym.imp.MSVCR100.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fprintf]
add esp, 0x10
call edi
push esi
mov esi, dword [sym.imp.MSVCR100.dll___iob_func]
push str.load_file:_could_not_allocate__ld_bytes_n
mov dword [eax], ebx
call esi
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fprintf]
call esi
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fflush]
add esp, 0x10
push 0x4815a0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call edi
mov dword [eax], ebx
mov ebx, dword [ebp - 8]
xor esi, esi
jmp 0x40f29a
push 0
lea edx, [ebp - 0xc]
push edx
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40f207
cmp dword [ebp - 0xc], esi
je 0x40f29a
test byte [0x4815b8], 0x80
je 0x40f28b
mov edi, dword [sym.imp.MSVCR100.dll__errno]
call edi
mov ebx, dword [eax]
push 0x4815a0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push str.load_file
push str.sysdeps_win32.cpp
push str._s::_s__:
call dword [sym.imp.MSVCR100.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fprintf]
add esp, 0x10
call edi
mov dword [eax], ebx
mov eax, dword [ebp + 8]
push eax
push esi
mov esi, dword [sym.imp.MSVCR100.dll___iob_func]
push str.load_file:_could_not_read__ld_bytes_from__s_n
call esi
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fprintf]
call esi
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fflush]
add esp, 0x14
push 0x4815a0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call edi
mov edi, dword [ebp - 4]
mov dword [eax], ebx
mov ebx, dword [ebp - 8]
push edi
call dword [sym.imp.MSVCR100.dll_free]
add esp, 4
xor esi, esi
mov dword [ebp - 4], esi
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp - 4]
mov dword [ecx], esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4101b0
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x198
mov eax, dword [0x480160]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [0x491608], 0
jne 0x410203
lea eax, [ebp - 0x198]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x4101ec
push str.adb:_could_not_initialize_Winsock_n
call fcn.00401000
push 0x4101a0
call fcn.00459dc1
add esp, 4
mov dword [0x491608], 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00459ce1
mov esp, ebp
pop ebp
ret
Function at 0x4104f0
Capabilities:
Create tcp socket
Create udp socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
mov eax, dword [0x480160]
xor eax, esp
mov dword [esp + 0x18], eax
push ebx
push esi
push edi
mov eax, 0x4710f8
call fcn.0040f410
mov esi, eax
test esi, esi
je 0x4105c2
cmp dword [0x491608], 0
jne 0x410529
call fcn.004101b0
mov ebx, dword [ebp + 8]
xor eax, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov eax, 2
push ebx
mov word [esp + 0x18], ax
call dword [sym.imp.WS2_32.dll_htons]
push 0x7f000001
mov word [esp + 0x1a], ax
call dword [sym.imp.WS2_32.dll_htonl]
push 0
push 1
push 2
mov dword [esp + 0x24], eax
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
cmp edi, 0xffffffff
je 0x4105c2
push 4
lea ecx, [esp + 0x14]
push ecx
push 0xfffffffffffffffb
push 0xffff
mov dword [esi + 0xc], edi
push edi
mov dword [esp + 0x24], 1
call dword [sym.imp.WS2_32.dll_setsockopt]
push 0x10
lea edx, [esp + 0x18]
push edx
push edi
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jns 0x4105d7
xor edi, edi
cmp dword [esi + 4], edi
je 0x4105c2
mov eax, dword [esi]
mov ecx, dword [eax + 4]
push esi
call ecx
add esp, 4
mov dword [esi + 4], edi
mov dword [esi + 8], edi
mov dword [esi], edi
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x18]
xor ecx, esp
call fcn.00459ce1
mov esp, ebp
pop ebp
ret
push 4
push edi
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
jns 0x4105fe
call fcn.0040f530
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x18]
xor ecx, esp
call fcn.00459ce1
mov esp, ebp
pop ebp
ret
push ebx
push 0x46f8ad
mov eax, esi
call fcn.0040f3d0
push eax
push str._d_lo_server:_s_d_
lea edx, [esi + 0x18]
push 0x20
push edx
call dword [sym.imp.MSVCR100.dll__snprintf]
add esp, 0x18
test byte [0x4815b8], 0x80
je 0x4106b3
mov edi, dword [sym.imp.MSVCR100.dll__errno]
call edi
mov ebx, dword [eax]
push 0x4815a0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push str.socket_loopback_server
push str.sysdeps_win32.cpp
push str._s::_s__:
call dword [sym.imp.MSVCR100.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fprintf]
add esp, 0x10
call edi
mov dword [eax], ebx
mov eax, esi
call fcn.0040f3d0
push eax
mov eax, dword [ebp + 8]
push 0x4712dc
push eax
push str.socket_loopback_server:_port__d_type__s___fd__d_n
call dword [sym.imp.MSVCR100.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fprintf]
add esp, 0x14
call dword [sym.imp.MSVCR100.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR100.dll_fflush]
add esp, 4
push 0x4815a0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call edi
mov dword [eax], ebx
mov eax, esi
call fcn.0040f3d0
mov ecx, dword [esp + 0x24]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00459ce1
mov esp, ebp
pop ebp
ret