Function at 0x10006110
Capabilities:
Get common file path
Get local ipv4 addresses
Get socket information
Link many functions at runtime

Disassembly:
sub esp, 0x538
push ebx
push ebp
mov ebp, dword [esp + 0x544]
push esi
push edi
mov dword [esp + 0x14], 0
test byte [ebp + 0x1ec], 4
je 0x100067d1
mov edx, dword [ebp + 0x1e4]
lea eax, [esp + 0x10]
lea ecx, [esp + 0x34]
push eax
push ecx
push edx
mov dword [esp + 0x1c], 0x80
call dword [sym.imp.WS2_32.dll_getpeername]
cmp eax, 0xffffffff
jne 0x10006181
add ebp, 0xc4
push 0x100
push ebp
push str.getpeername__:
call fcn.100071f0
add esp, 0xc
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x538
ret
mov eax, dword [0x10032c34]
mov esi, dword [esp + 0x10]
test eax, eax
jne 0x1000619a
push 1
call fcn.10003b90
mov dword [0x10032c34], eax
push 0xa
lea ecx, [esp + 0x344]
push 0x80
push ecx
lea edx, [esp + 0x1cc]
push 0x80
push edx
lea ecx, [esp + 0x48]
push esi
push ecx
call eax
mov esi, eax
push esi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
test esi, esi
jne 0x1000668a
mov ecx, dword [ebp + 0x1e4]
lea edx, [esp + 0x10]
lea eax, [esp + 0x34]
push edx
push eax
push ecx
call dword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
jne 0x10006212
add ebp, 0xc4
push 0x100
push ebp
push str.getsockname__:
call fcn.100071f0
add esp, 0xc
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x538
ret
mov eax, dword [0x10032c34]
mov ebx, dword [esp + 0x10]
test eax, eax
jne 0x100063f3
mov eax, dword [0x10032c28]
mov dword [esp + 0x18], str.getaddrinfo
test eax, eax
mov dword [esp + 0x1c], 0x100026b0
mov dword [esp + 0x20], str.getnameinfo
mov dword [esp + 0x24], 0x100033f0
mov dword [esp + 0x28], str.freeaddrinfo
mov dword [esp + 0x2c], 0x10002660
jne 0x100063e9
lea edx, [esp + 0x440]
push 0x104
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x100063df
lea edi, [esp + 0x440]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0xb4]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0xb4]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.ws2_32
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0xb4]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
je 0x10006306
push str.getaddrinfo
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x1000638f
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea edi, [esp + 0x440]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0xb4]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0xb4]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.wship6
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0xb4]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
je 0x100063df
push str.getaddrinfo
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x1000638f
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x100063df
mov ecx, dword [0x100201f0]
xor ebp, ebp
test ecx, ecx
jle 0x100063c2
lea edi, [esp + 0x1c]
mov ecx, dword [edi - 4]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
mov dword [edi], eax
je 0x1000646b
mov ecx, dword [0x100201f0]
inc ebp
add edi, 8
cmp ebp, ecx
jl 0x1000639f
xor eax, eax
test ecx, ecx
jle 0x100063d8
mov edx, dword [esp + eax*8 + 0x1c]
mov dword [eax*8 + 0x1002d24c], edx
inc eax
cmp eax, ecx
jl 0x100063c8
mov ebp, dword [esp + 0x54c]
mov dword [0x10032c28], 1
mov eax, dword [0x1002d254]
mov dword [0x10032c34], eax
push 0xa
lea ecx, [esp + 0x2c4]
push 0x80
push ecx
lea edx, [esp + 0x24c]
push 0x80
push edx
lea ecx, [esp + 0x48]
push ebx
push ecx
call eax
mov esi, eax
push esi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
test esi, esi
jne 0x1000668a
mov ecx, dword [ebp + 0x1e8]
lea edx, [esp + 0x10]
lea eax, [esp + 0x34]
push edx
push eax
push ecx
call dword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
jne 0x10006477
add ebp, 0xc4
push 0x100
push ebp
push str.getsockname__:
call fcn.100071f0
add esp, 0xc
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x538
ret
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x100063d8
mov eax, dword [0x10032c34]
mov edx, dword [esp + 0x10]
test eax, eax
mov dword [esp + 0x30], edx
jne 0x1000665e
mov eax, dword [0x10032c28]
mov dword [esp + 0x18], str.getaddrinfo
test eax, eax
mov dword [esp + 0x1c], 0x100026b0
mov dword [esp + 0x20], str.getnameinfo
mov dword [esp + 0x24], 0x100033f0
mov dword [esp + 0x28], str.freeaddrinfo
mov dword [esp + 0x2c], 0x10002660
jne 0x10006654
lea eax, [esp + 0x440]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x1000664a
lea edi, [esp + 0x440]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0xb4]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0xb4]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.ws2_32
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0xb4]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
je 0x10006573
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.getaddrinfo
push esi
call ebx
test eax, eax
jne 0x100065fe
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x10006579
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
lea edi, [esp + 0x440]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0xb4]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0xb4]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.wship6
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0xb4]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
je 0x1000664a
push str.getaddrinfo
push esi
call ebx
test eax, eax
jne 0x100065fe
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x1000664a
mov ecx, dword [0x100201f0]
xor ebp, ebp
test ecx, ecx
jle 0x1000662d
lea edi, [esp + 0x1c]
mov ecx, dword [edi - 4]
push ecx
push esi
call ebx
test eax, eax
mov dword [edi], eax
je 0x100066b1
mov ecx, dword [0x100201f0]
inc ebp
add edi, 8
cmp ebp, ecx
jl 0x1000660e
xor eax, eax
test ecx, ecx
jle 0x10006643
mov edx, dword [esp + eax*8 + 0x1c]
mov dword [eax*8 + 0x1002d24c], edx
inc eax
cmp eax, ecx
jl 0x10006633
mov ebp, dword [esp + 0x54c]
mov dword [0x10032c28], 1
mov eax, dword [0x1002d254]
mov dword [0x10032c34], eax
mov edx, dword [esp + 0x30]
push 8
lea ecx, [esp + 0x3c4]
push 0x80
push ecx
push 0
push 0
lea ecx, [esp + 0x48]
push edx
push ecx
call eax
mov esi, eax
push esi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
test esi, esi
je 0x100066ba
add ebp, 0xc4
push 0x100
push ebp
push str.getnameinfo__:
call fcn.100071f0
add esp, 0xc
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x538
ret
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x10006643
mov edi, dword [ebp + 0x1fc]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, ecx
lea ebp, [edi + 0x400]
lea edx, [ebp + 1]
push edx
call fcn.100169d2
add esp, 4
mov esi, eax
test edi, edi
je 0x1000673b
mov ebx, dword [esp + 0x54c]
lea eax, [esp + 0x3c0]
lea ecx, [esp + 0x1c0]
push eax
lea edx, [esp + 0x244]
push ecx
lea eax, [esp + 0x348]
push edx
lea ecx, [esp + 0x2cc]
push eax
lea edx, [esp + 0x1d0]
push ecx
mov ecx, dword [ebx + 0x1fc]
lea eax, [esp + 0x254]
push edx
push eax
push ecx
push str.__s__and_not__host__s_and_host__s_and_port__s_and_port__s__and_not__host__s_and_host__s_and_port__s_
push ebp
push esi
call fcn.10016898
add esp, 0x2c
jmp 0x1000678d
lea edx, [esp + 0x3c0]
lea eax, [esp + 0x1c0]
push edx
lea ecx, [esp + 0x244]
push eax
lea edx, [esp + 0x348]
push ecx
lea eax, [esp + 0x2cc]
push edx
lea ecx, [esp + 0x1d0]
push eax
lea edx, [esp + 0x254]
push ecx
push edx
push str.not__host__s_and_host__s_and_port__s_and_port__s__and_not__host__s_and_host__s_and_port__s_
push 0x400
push esi
call fcn.10016898
mov ebx, dword [esp + 0x574]
add esp, 0x28
mov eax, dword [esp + 0x550]
push 0
push 1
push esi
push eax
mov byte [esi + edi + 0x400], 0
push ebx
mov dword [ebx + 0x1e0], 0
call sym.wpcap.dll_pcap_compile
add esp, 0x14
cmp eax, 0xffffffff
jne 0x100067be
mov dword [esp + 0x14], eax
push esi
mov dword [ebx + 0x1e0], 1
call fcn.100168e9
add esp, 4
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x538
ret