Function at 0x10003f40
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push edi
push 0xc10
push 8
mov dword [ebp - 4], 0xc00
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
je 0x10003f7c
push 0xc10
push 0
push edi
call sub.MSVCRT.dll_memset
add esp, 0xc
mov ebx, edi
mov dword [ebp - 8], ebx
mov dword [ebp - 0x48], str.CLOSED
mov dword [ebp - 0x44], str.LISTEN
mov dword [ebp - 0x40], str.SYN_SENT
mov dword [ebp - 0x3c], str.SYN_RCVD
mov dword [ebp - 0x38], str.ESTAB
mov dword [ebp - 0x34], str.FIN_WAIT1
mov dword [ebp - 0x30], str.FIN_WAIT2
mov dword [ebp - 0x2c], str.CLOSE_WAIT
mov dword [ebp - 0x28], str.CLOSING
mov dword [ebp - 0x24], str.LAST_ACK
mov dword [ebp - 0x20], str.TIME_WAIT
mov dword [ebp - 0x1c], str.DELETE_TCB
test edi, edi
je 0x10004285
push 1
lea eax, [ebp - 4]
push eax
push edi
call dword [sym.imp.IPHLPAPI.DLL_GetTcpTable]
cmp eax, 0x7a
jne 0x10004050
push edi
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapValidate]
test eax, eax
je 0x1000400b
push edi
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov edi, dword [ebp - 4]
xor ebx, ebx
test edi, edi
je 0x10004038
add edi, 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 0x10004038
push edi
push 0
push ebx
call sub.MSVCRT.dll_memset
add esp, 0xc
mov dword [ebp - 8], ebx
test ebx, ebx
je 0x10004285
push 1
lea ecx, [ebp - 4]
push ecx
push ebx
call dword [sym.imp.IPHLPAPI.DLL_GetTcpTable]
test eax, eax
je 0x1000407d
push ebx
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapValidate]
test eax, eax
je 0x10004285
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 edi, dword [ebx]
imul edi, edi, 0x64
add edi, 0x96
mov dword [ebp - 0x18], edi
je 0x10004130
add edi, 0x13
and edi, 0xfffffff0
push edi
push 8
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
mov dword [ebp - 0x10], esi
test esi, esi
je 0x10004130
push edi
push 0
push esi
call sub.MSVCRT.dll_memset
mov eax, str.netstat_nProto_tLocal_address_tRemote_address_tState_n
mov edx, esi
add esp, 0xc
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x100040c5
cmp dword [ebx], 0
mov dword [ebp - 0x14], 0
jle 0x100041ea
add ebx, 0x10
mov edx, dword [ebx - 8]
push edx
call fcn.10003e50
mov edi, eax
test edi, edi
je 0x100041d5
mov eax, dword [ebx]
push eax
call fcn.10003e50
mov dword [ebp - 0xc], eax
test eax, eax
jne 0x10004140
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapValidate]
test eax, eax
je 0x100041d5
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x100041d5
mov esi, ebx
call fcn.10013d60
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, esi
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10004145
mov ecx, dword [ebx - 0xc]
mov edx, dword [ebp + ecx*4 - 0x4c]
sub eax, esi
mov esi, eax
movzx eax, word [ebx + 4]
push edx
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
mov edx, dword [ebp - 0xc]
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]
add esi, dword [ebp - 0x10]
movzx ecx, ax
push ecx
push edi
push str.TCP_t_s:_d_t_s:_d_t_s_n
push edx
push esi
call dword [sym.imp.MSVCRT.dll__snprintf]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
add esp, 0x20
push edi
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapValidate]
test eax, eax
je 0x100041b3
push edi
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov edi, dword [ebp - 0xc]
push edi
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapValidate]
test eax, eax
je 0x100041d2
push edi
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov esi, dword [ebp - 0x10]
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 8]
inc eax
add ebx, 0x14
mov dword [ebp - 0x14], eax
cmp eax, dword [ecx]
jl 0x100040e2
lea eax, [esi - 1]
lea ecx, [ecx]
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x100041f0
mov dx, word [0x10045a7c]
mov word [eax], dx
mov cl, byte [0x10045a7e]
mov byte [eax + 2], cl
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10004210
sub eax, edx
mov ebx, eax
mov dword [ebp - 0x18], 0
je 0x10004263
mov edi, dword [ebp + 8]
push 1
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push ebx
push 0
push eax
push edi
mov dword [ebp + 8], eax
call dword [sym.imp.KERNEL32.dll_LockFile]
push 0
lea edx, [ebp - 0x18]
push edx
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp + 8]
push 0
push ebx
push 0
push eax
push edi
call dword [sym.imp.KERNEL32.dll_UnlockFile]
mov edi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push esi
push 0
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapValidate]
test eax, eax
je 0x10004285
push esi
push 0
call edi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4