Function at 0x401501
Capabilities:
Connect socket
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x44
call sym._VMCISock_GetAFValue
mov dword [my_addr.svm_zero], eax
call dbg.debug_is_active
test eax, eax
je 0x401583
call dbg.debug_get_time_stack_tabs
mov ebx, eax
call dbg.debug_get_time_str_now
mov dword [esp + 0xc], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], 0x408056
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
mov eax, dword [ebp + 0xc]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 8]
mov dword [esp + 8], eax
mov dword [esp + 4], str.vmci_connecting_to_CID__u:_u
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], 0xa
call sym._fputc
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov eax, dword [my_addr.svm_zero]
mov dword [esp], eax
call sym._socket_12
sub esp, 0xc
mov dword [my_addr.svm_cid], eax
cmp dword [my_addr.svm_cid], 0
jns 0x4015c2
mov dword [esp], str.error_creating_socket
call dbg.psockerror
mov dword [esp], 1
call sym._exit
call dbg.debug_is_active
test eax, eax
je 0x40162e
call dbg.debug_get_time_stack_tabs
mov ebx, eax
call dbg.debug_get_time_str_now
mov dword [esp + 0xc], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], 0x408056
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
mov eax, dword [my_addr.svm_cid]
mov dword [esp + 8], eax
mov dword [esp + 4], str.vmci_socket_d
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], 0xa
call sym._fputc
mov dword [their_addr.svm_cid], 0
mov dword [their_addr.svm_zero], 0
mov dword [my_addr.svm_family], 0
mov dword [my_addr.svm_port], 0
mov eax, dword [my_addr.svm_zero]
mov word [their_addr.svm_cid], ax
mov dword [my_addr.svm_family], 0xffffffff
mov dword [their_addr.svm_zero], 0xffffffff
mov eax, dword [my_addr.svm_cid]
mov dword [esp + 8], 0x10
lea edx, [their_addr.svm_cid]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._bind_12
sub esp, 0xc
cmp eax, 0xffffffff
jne 0x4016a4
mov dword [esp], str.bind
call dbg.psockerror
mov eax, dword [my_addr.svm_cid]
mov dword [esp], eax
call dbg.socket_close
mov dword [esp], 1
call sym._exit
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
mov dword [their_addr.svm_family], 0
mov dword [their_addr.svm_port], 0
mov eax, dword [my_addr.svm_zero]
mov word [ebp - 0x30], ax
cmp dword [ebp + 8], 0xffffffff
je 0x4016d2
mov eax, dword [ebp + 8]
jmp 0x4016d7
mov eax, 0xffffffff
mov dword [their_addr.svm_family], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x2c], eax
mov eax, dword [my_addr.svm_cid]
mov dword [esp + 8], 0x10
lea edx, [ebp - 0x30]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._connect_12
sub esp, 0xc
cmp eax, 0xffffffff
jne 0x401805
mov dword [esp], str.connect
call dbg.psockerror
call dbg.debug_is_active
test eax, eax
je 0x401787
call dbg.debug_get_time_stack_tabs
mov ebx, eax
call dbg.debug_get_time_str_now
mov dword [esp + 0xc], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], 0x408056
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0xe
mov dword [esp + 4], 1
mov dword [esp], str.connect_failed
call sym._fwrite
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], 0xa
call sym._fputc
call dbg.debug_is_active
test eax, eax
je 0x4017f3
call dbg.debug_get_time_stack_tabs
mov ebx, eax
call dbg.debug_get_time_str_now
mov dword [esp + 0xc], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], 0x408056
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
mov eax, dword [my_addr.svm_cid]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Closing_vmci_socket__u
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call sym._fprintf
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 4], eax
mov dword [esp], 0xa
call sym._fputc
mov eax, dword [my_addr.svm_cid]
mov dword [esp], eax
call dbg.socket_close
mov eax, 0xffffffff
jmp 0x401808
mov eax, dword [my_addr.svm_cid]
mov ebx, dword [ebp - 4]
leave
ret