Function at 0x40876f
Capabilities:
Resolve dns
Set socket configuration
Terminate process

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x10]
push esi
xor esi, esi
dec eax
push edi
cmp eax, 0xe
ja case.default.0x408783
jmp dword [eax*4 + 0x408ad3]
mov edi, dword [ebp + 0xc]
movsx eax, byte [edi]
push eax
call fcn.0040f851
pop ecx
push edi
test eax, eax
je 0x4087c0
call sub.WSOCK32.dll_gethostbyname
test eax, eax
je 0x408abf
mov eax, dword [eax + 0xc]
push 4
push dword [eax]
push dword [ebp + 8]
call fcn.0040ba80
add esp, 0xc
jmp 0x408ab9
call sub.WSOCK32.dll_inet_addr
mov ecx, eax
or edx, 0xffffffff
mov eax, dword [ebp + 8]
mov dword [eax], ecx
cmp ecx, edx
jne 0x408ab9
mov eax, edx
jmp 0x408abb
lea eax, [ebp + 0x10]
push eax
push 0x41e6b0
push dword [ebp + 0xc]
call fcn.0040f4cd
mov ecx, dword [ebp + 0x10]
or edx, 0xffffffff
add esp, 0xc
cmp eax, 1
cmovne esi, edx
cmp ecx, 0x1d
ja 0x40880e
mov eax, dword [ebp + 8]
mov dword [eax + 4], ecx
jmp 0x408ab9
mov esi, edx
jmp 0x408ab9
lea eax, [ebp + 0x10]
push eax
push 0x41e6b0
push dword [ebp + 0xc]
call fcn.0040f4cd
mov ecx, dword [ebp + 0x10]
or edx, 0xffffffff
add esp, 0xc
cmp eax, 1
cmovne esi, edx
cmp ecx, 0x3c
ja 0x40880e
mov eax, dword [ebp + 8]
mov dword [eax + 8], ecx
jmp 0x408ab9
lea eax, [ebp + 0x10]
push eax
push 0x41e6b0
push dword [ebp + 0xc]
call fcn.0040f4cd
mov ecx, dword [ebp + 0x10]
or edx, 0xffffffff
add esp, 0xc
cmp eax, 1
cmovne esi, edx
cmp ecx, 0x3c
ja 0x40880e
mov eax, dword [ebp + 8]
mov dword [eax + 0xc], ecx
jmp 0x408ab9
lea eax, [ebp + 0x10]
push eax
push 0x41e6b0
push dword [ebp + 0xc]
call fcn.0040f4cd
xor ecx, ecx
add esp, 0xc
inc ecx
cmp eax, ecx
jne case.default.0x408783
mov eax, dword [ebp + 0x10]
cmp eax, 0x12c
je 0x408926
cmp eax, 0x258
je 0x408917
cmp eax, 0x4b0
je 0x408908
cmp eax, 0x960
je 0x4088f9
cmp eax, 0x12c0
je 0x4088ea
cmp eax, 0x2580
je 0x4088db
cmp eax, 0x4b00
jne case.default.0x408783
mov eax, dword [ebp + 8]
mov dword [eax + 0x10], ecx
jmp 0x408ab9
mov eax, dword [ebp + 8]
mov dword [eax + 0x10], 2
jmp 0x408ab9
mov eax, dword [ebp + 8]
mov dword [eax + 0x10], 3
jmp 0x408ab9
mov eax, dword [ebp + 8]
mov dword [eax + 0x10], 4
jmp 0x408ab9
mov eax, dword [ebp + 8]
mov dword [eax + 0x10], 5
jmp 0x408ab9
mov eax, dword [ebp + 8]
mov dword [eax + 0x10], 6
jmp 0x408ab9
mov eax, dword [ebp + 8]
mov dword [eax + 0x10], 7
jmp 0x408ab9
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
or dword [edx + 0x14], 3
movsx eax, byte [eax]
mov ecx, dword [edx + 0x14]
cmp eax, 0x4e
jg 0x40897d
je 0x408997
sub eax, 0x31
je 0x408978
dec eax
je 0x408970
sub eax, 5
je 0x40896b
dec eax
je 0x408966
sub eax, 0xd
jne 0x40898f
or ecx, 0x30
jmp 0x408997
or ecx, 0xc
jmp 0x408997
or ecx, 8
jmp 0x408997
or ecx, 0xc0
jmp 0x408997
or ecx, 0x40
jmp 0x408997
sub eax, 0x4f
je 0x408994
sub eax, 0x16
je 0x408961
sub eax, 9
je 0x408997
dec eax
je 0x408994
or esi, 0xffffffff
jmp 0x40899a
or ecx, 0x10
mov dword [edx + 0x14], ecx
or dword [edx + 0x14], 1
jmp 0x408ab9
mov eax, dword [ebp + 0xc]
movsx eax, byte [eax]
sub eax, 0x30
je 0x4089c3
dec eax
je 0x4089be
dec eax
dec eax
jne case.default.0x408783
push 3
pop ecx
jmp 0x4089c5
xor ecx, ecx
inc ecx
jmp 0x4089c5
mov ecx, esi
mov eax, dword [ebp + 8]
mov dword [eax + 0x18], ecx
jmp 0x408ab9
lea eax, [ebp + 0x10]
push eax
push 0x41e6b0
push dword [ebp + 0xc]
call fcn.0040f4cd
add esp, 0xc
cmp eax, 1
jne case.default.0x408783
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0x10]
mov dword [ecx + 0x1c], eax
jmp 0x408ab9
lea eax, [ebp + 0x10]
push eax
push 0x41e6b0
push dword [ebp + 0xc]
call fcn.0040f4cd
add esp, 0xc
cmp eax, 1
jne case.default.0x408783
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0x10]
mov dword [ecx + 0x20], eax
jmp 0x408ab9
lea eax, [ebp + 0x10]
push eax
push 0x41e6b0
push dword [ebp + 0xc]
call fcn.0040f4cd
add esp, 0xc
cmp eax, 1
jne case.default.0x408783
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0x10]
mov dword [ecx + 0x24], eax
jmp 0x408ab9
lea eax, [ebp + 0x10]
push eax
push 0x41e6b0
push dword [ebp + 0xc]
call fcn.0040f4cd
add esp, 0xc
cmp eax, 1
jne case.default.0x408783
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0x10]
mov dword [ecx + 0x28], eax
jmp 0x408ab9
dec ebx
lea eax, [ebp + 0x10]
push eax
push 0x41e6b0
push dword [ebp + 0xc]
call fcn.0040f4cd
add esp, 0xc
cmp eax, 1
jne case.default.0x408783
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0x10]
mov dword [ecx + 0x2c], eax
jmp 0x408ab9
lea eax, [ebp + 0x10]
push eax
push 0x41e6b0
push dword [ebp + 0xc]
call fcn.0040f4cd
add esp, 0xc
cmp eax, 1
jne case.default.0x408783
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0x10]
mov dword [ecx + 0x30], eax
jmp 0x408ab9
or esi, 0xffffffff
mov eax, esi
pop edi
pop esi
pop ebp
ret
push str.BETA_Name_nicht_in__etc_hosts_n
call fcn.0040f3f8
pop ecx
push esi
call fcn.0040a627
lea ecx, [ecx]
mov al, byte [edi - 0x7821ffc0]
inc eax
add byte [0x45004088], dl
mov byte [eax], al
jne 0x408a6d
inc eax
add byte [0x35004089], dh
mov dword [eax], eax
xor eax, 0xa3004089
mov dword [eax], eax
ror byte [ecx - 0x7604ffc0], 1
inc eax
add byte [esi], ah
mov al, byte [eax]
dec edx
mov al, byte [eax]
outsb dx, byte [esi]
mov al, byte [eax]
xchg edx, eax
mov al, byte [eax]