Function at 0x100040f0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push edi
push 0xc10
push 8
mov dword [ebp - 8], 0xc00
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
je 0x1000412c
push 0xc10
push 0
push edi
call sub.MSVCRT.dll_memset
add esp, 0xc
mov ebx, edi
mov dword [ebp - 4], ebx
mov dword [ebp - 0x4c], str.CLOSED
mov dword [ebp - 0x48], str.LISTEN
mov dword [ebp - 0x44], str.SYN_SENT
mov dword [ebp - 0x40], str.SYN_RCVD
mov dword [ebp - 0x3c], str.ESTAB
mov dword [ebp - 0x38], str.FIN_WAIT1
mov dword [ebp - 0x34], str.FIN_WAIT2
mov dword [ebp - 0x30], str.CLOSE_WAIT
mov dword [ebp - 0x2c], str.CLOSING
mov dword [ebp - 0x28], str.LAST_ACK
mov dword [ebp - 0x24], str.TIME_WAIT
mov dword [ebp - 0x20], str.DELETE_TCB
test edi, edi
je 0x100043c4
push 1
lea eax, [ebp - 8]
push eax
push edi
call dword [sym.imp.IPHLPAPI.DLL_GetTcpTable]
cmp eax, 0x7a
jne 0x10004200
push edi
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapValidate]
test eax, eax
je 0x100041bb
push edi
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 8]
xor ebx, ebx
test eax, eax
je 0x100041e8
lea edi, [eax + 0x13]
and edi, 0xfffffff0
push edi
push 8
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x100041e8
push edi
push 0
push ebx
call sub.MSVCRT.dll_memset
add esp, 0xc
mov dword [ebp - 4], ebx
test ebx, ebx
je 0x100043c4
push 1
lea ecx, [ebp - 8]
push ecx
push ebx
call dword [sym.imp.IPHLPAPI.DLL_GetTcpTable]
test eax, eax
je 0x1000422d
push ebx
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapValidate]
test eax, eax
je 0x100043c4
push ebx
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebx]
imul eax, eax, 0x64
add eax, 0x96
mov dword [ebp - 0x18], eax
je 0x100043d0
lea ebx, [eax + 0x13]
and ebx, 0xfffffff0
push ebx
push 8
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
mov dword [ebp - 0xc], edi
test edi, edi
je 0x100043cd
push ebx
push 0
push edi
call sub.MSVCRT.dll_memset
mov eax, str.netstat_nProto_tLocal_address_tRemote_address_tState_n
mov edx, edi
add esp, 0xc
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x10004274
mov ebx, dword [ebp - 4]
cmp dword [ebx], 0
mov dword [ebp - 0x14], 0
jle 0x10004363
add ebx, 0x10
mov edx, dword [ebx - 8]
push edx
call fcn.10004000
mov edi, eax
test edi, edi
je 0x1000434b
mov eax, dword [ebx]
push eax
call fcn.10004000
mov dword [ebp - 0x10], eax
test eax, eax
je 0x1000432f
mov eax, dword [ebp - 0xc]
lea ecx, [eax + 1]
lea esp, [esp]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x100042c0
sub eax, ecx
mov ecx, dword [ebx - 0xc]
mov edx, dword [ebp + ecx*4 - 0x50]
mov dword [ebp - 0x1c], eax
movzx eax, word [ebx + 4]
push edx
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov edx, dword [ebp - 0x10]
movzx ecx, ax
movzx eax, word [ebx - 4]
push ecx
push edx
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov edx, dword [ebp - 0x18]
movzx ecx, ax
mov eax, dword [ebp - 0x1c]
add eax, dword [ebp - 0xc]
push ecx
push edi
push str.TCP_t_s:_d_t_s:_d_t_s_n
push edx
push eax
call dword [sym.imp.MSVCRT.dll__snprintf]
add esp, 0x20
push edi
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapValidate]
test eax, eax
je 0x1000432c
push edi
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov edi, dword [ebp - 0x10]
push edi
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapValidate]
test eax, eax
je 0x1000434b
push edi
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 4]
inc eax
add ebx, 0x14
mov dword [ebp - 0x14], eax
cmp eax, dword [edx]
jl 0x10004294
mov edi, dword [ebp - 0xc]
lea eax, [edi - 1]
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x10004366
mov cx, word [0x10043b50]
mov word [eax], cx
mov dl, byte [0x10043b52]
mov byte [eax + 2], dl
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10004386
push 0
lea ecx, [ebp - 0x1c]
push ecx
sub eax, edx
mov edx, dword [ebp + 8]
push eax
push edi
push edx
mov dword [ebp - 0x1c], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapValidate]
test eax, eax
je 0x100043c4
push edi
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ebx, dword [ebp - 4]
mov esi, ebx
call fcn.10012d20
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4