Function at 0x4020f9
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 0x40217b
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], 0x40e392
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 0x4021ba
mov dword [esp], 0x40e3b8
call sym._perror
mov dword [esp], 1
call sym._exit
call dbg.debug_is_active
test eax, eax
je 0x402226
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], 0x40e392
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], 0x40e3cf
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 0x40229c
mov dword [esp], 0x40e3de
call sym._perror
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 0x4022ca
mov eax, dword [ebp + 8]
jmp 0x4022cf
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 0x4023f1
call dbg.debug_is_active
test eax, eax
je 0x402373
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], 0x40e392
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 0x4023df
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], 0x40e392
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 0x4023f4
mov eax, dword [my_addr.svm_cid]
mov ebx, dword [ebp - 4]
leave
ret