Function at 0x10040dd9f
Capabilities:
Set current directory

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x60
mov dword [rsp + 0x5c], 0
mov r8d, 0x606
lea rdx, global___FUNCTION__.204
lea rcx, str.src.it_iroffer_misc.c
call dbg.updatecontext_f
call sym.getpid
mov r8d, eax
mov rbx, qword [0x1004632d0]
mov rcx, qword [rbx + 0xa9d0]
movabs rdx, 0x346dc5d63886594b
mov rax, rcx
imul rdx
sar rdx, 0xa
mov rax, rcx
sar rax, 0x3f
sub rdx, rax
imul rdx, rdx, 0x1388
sub rcx, rdx
imul r8d, r8d, 0x1388
add ecx, r8d
call sym.srand
cmp dword [rbx + 0x7964], 0
jne 0x10040de39
mov edx, 1
mov ecx, 1
call dbg.initscreen
call dbg.gotobot
call dbg.gototop
mov ecx, 0xa
call sym.putchar
mov rax, qword [0x1004632d0]
cmp dword [rax + 0x7964], 0
jne 0x10040de68
cmp dword [rax + 0xb78c], 0
jne 0x10040de68
lea rcx, str.e_1_33m
call sym.printf
lea rcx, str.Benvenuto_su_Iroffer_CWLabs_ITA_by_CreeW_2010___creew_walla.com___geoip6_gnutls_ruby_nVersione_3.30__Win32__2.4.1
call sym.puts
mov rax, qword [0x1004632d0]
cmp dword [rax + 0x7964], 0
jne 0x10040de99
cmp dword [rax + 0xb78c], 0
jne 0x10040de99
lea rcx, str.e_0m
call sym.printf
mov ecx, 0xa
call sym.putchar
lea rbx, [rsp + 0x40]
mov qword [rsp + 0x48], 0
mov qword [rsp + 0x50], 0
lea rax, [dbg.iroffer_signal_handler]
mov qword [rsp + 0x40], rax
mov dword [rsp + 0x50], 2
lea rcx, [rsp + 0x48]
call sym.sigfillset
mov r8d, 0
mov rdx, rbx
mov ecx, 0xa
call sym.sigaction
mov r8d, 0
mov rdx, rbx
mov ecx, 6
call sym.sigaction
mov r8d, 0
mov rdx, rbx
mov ecx, 4
call sym.sigaction
mov r8d, 0
mov rdx, rbx
mov ecx, 8
call sym.sigaction
mov r8d, 0
mov rdx, rbx
mov ecx, 0xb
call sym.sigaction
mov r8d, 0
mov rdx, rbx
mov ecx, 0xf
call sym.sigaction
mov r8d, 0
mov rdx, rbx
mov ecx, 2
call sym.sigaction
mov r8d, 0
mov rdx, rbx
mov ecx, 0x1e
call sym.sigaction
mov r8d, 0
mov rdx, rbx
mov ecx, 0x1f
call sym.sigaction
mov r8d, 0
mov rdx, rbx
mov ecx, 0x14
call sym.sigaction
mov edx, 1
mov ecx, 0xd
call sym.signal
mov edx, 1
mov ecx, 0xe
call sym.signal
mov edx, 1
mov ecx, 1
call sym.signal
mov edx, 1
mov ecx, 0x12
call sym.signal
lea rcx, str._Iroffer_CWLabs__distribuito_tramite_GNU_General_Public_License._n____perfavore_consulta_il_file_LICENSE_per_maggiori_informazioni.
call sym.puts
lea rcx, str._n_In_avvio...
call sym.puts
mov rax, qword [0x1004632d0]
mov rcx, qword [rax + 0xb730]
test rcx, rcx
je 0x10040e10b
call sym.getpwnam
mov rbx, rax
test rax, rax
jne 0x10040e050
mov rax, qword [0x1004632d0]
mov rcx, qword [rax + 0xb730]
call sym.atoi
mov ecx, eax
call sym.getpwuid
mov rbx, rax
test rax, rax
jne 0x10040e050
call sym.__errno
mov ecx, dword [rax]
call sym.strerror
mov r8, rax
lea rdx, str.Non_posso_trovare_lutente:__s
mov ecx, 0
call dbg.outerror
mov ebp, dword [rbx + 0x10]
mov r12d, dword [rbx + 0x14]
mov dword [rsp + 0x5c], 0x10
mov dword [rsp + 0x20], 0x647
lea r9, str.src.it_iroffer_misc.c
lea r8, global___FUNCTION__.204
mov edx, 1
mov ecx, 0x40
call dbg.mymalloc2
mov rsi, rax
mov edx, dword [rbx + 0x14]
lea r9, [rsp + 0x5c]
mov r8, rax
mov rcx, qword [rbx]
call sym.getgrouplist
test eax, eax
jns 0x10040e11b
mov rcx, rsi
call dbg.mydelete2
movsxd rcx, dword [rsp + 0x5c]
shl rcx, 2
mov dword [rsp + 0x20], 0x64c
lea r9, str.src.it_iroffer_misc.c
lea r8, global___FUNCTION__.204
mov edx, 1
call dbg.mymalloc2
mov rsi, rax
mov edx, dword [rbx + 0x14]
lea r9, [rsp + 0x5c]
mov r8, rax
mov rcx, qword [rbx]
call sym.getgrouplist
test eax, eax
jns 0x10040e11b
call sym.__errno
mov ecx, dword [rax]
call sym.strerror
mov r8, rax
lea rdx, str.Non_posso_trovare_la_lista_del_gruppo:__s
mov ecx, 0
call dbg.outerror
jmp 0x10040e11b
mov esi, 0
mov r12d, 0
mov ebp, 0
call sym.geteuid
test eax, eax
jne 0x10040e1ae
mov rax, qword [0x1004632d0]
mov rdx, qword [rax + 0xb728]
test rdx, rdx
je 0x10040e1ae
lea rcx, str._Sto_cambiando_il_filesystem_root_in__s_n
call sym.printf
mov rax, qword [0x1004632d0]
mov rcx, qword [rax + 0xb728]
call sym.chroot
test eax, eax
jns 0x10040e17e
call sym.__errno
mov ecx, dword [rax]
call sym.strerror
mov r8, rax
lea rdx, str.Non_psso_effettuare_il_chroot:__s
mov ecx, 0
call dbg.outerror
lea rcx, [0x100450a42]
call sym.chdir
test eax, eax
jns 0x10040e1ae
call sym.__errno
mov ecx, dword [rax]
call sym.strerror
mov r8, rax
lea rdx, str.Non_psso_effettuare_il_chdir:__s
mov ecx, 0
call dbg.outerror
mov rax, qword [0x1004632d0]
mov rcx, qword [rax + 0xb738]
test rcx, rcx
je 0x10040e1ea
call sym.chdir
test eax, eax
jns 0x10040e1ea
call sym.__errno
mov ecx, dword [rax]
call sym.strerror
mov r8, rax
lea rdx, str.Non_psso_effettuare_il_chdir:__s
mov ecx, 0
call dbg.outerror
mov rax, qword [0x1004632d0]
mov rdx, qword [rax + 0xb730]
test rdx, rdx
je 0x10040e2e1
mov r9d, r12d
mov r8d, ebp
lea rcx, str._Doso_i_provilegi_root_allutente__s___u__u__gruppo:
call sym.printf
cmp dword [rsp + 0x5c], 0
jle 0x10040e23d
mov ebx, 0
lea rdi, [0x100450aa7]
movsxd rax, ebx
mov edx, dword [rsi + rax*4]
mov rcx, rdi
call sym.printf
add ebx, 1
cmp dword [rsp + 0x5c], ebx
jg 0x10040e226
lea rcx, [0x100450aab]
call sym.puts
mov ecx, r12d
call sym.setgid
test eax, eax
jns 0x10040e275
call sym.__errno
mov ecx, dword [rax]
call sym.strerror
mov r8, rax
lea rdx, str.Non_posso_cambiare_il_gruppo:__s
mov ecx, 0
call dbg.outerror
call sym.geteuid
test eax, eax
jne 0x10040e2ae
mov rdx, rsi
mov ecx, dword [rsp + 0x5c]
call sym.setgroups
test eax, eax
jns 0x10040e2ae
call sym.__errno
mov ecx, dword [rax]
call sym.strerror
mov r8, rax
lea rdx, str.Non_posso_settare_la_lista_gruppo:__s
mov ecx, 0
call dbg.outerror
mov ecx, ebp
call sym.setuid
test eax, eax
jns 0x10040e2d9
call sym.__errno
mov ecx, dword [rax]
call sym.strerror
mov r8, rax
lea rdx, str.Non_posso_cambiare_ad_utente:__s
mov ecx, 0
call dbg.outerror
mov rcx, rsi
call dbg.mydelete2
call sym.geteuid
test eax, eax
jne 0x10040e2fb
lea rdx, str.Iroffer_non_dovrebbe_essere_aviato_come_root_
mov ecx, 1
call dbg.outerror
mov rax, qword [0x1004632d0]
cmp dword [rax + 0x7964], 0
jne 0x10040e324
mov edx, dword [rax + 0xb784]
mov r8d, dword [rax + 0xb788]
lea rcx, str._Grandezza_finestra:__ux_u_n
call sym.printf
mov dword [rsp + 0x20], 0x694
lea r9, str.src.it_iroffer_misc.c
lea r8, global___FUNCTION__.204
mov edx, 0
mov ecx, 0x200
call dbg.mymalloc2
mov rbx, rax
mov r8d, 0x200
mov edx, 0
mov rcx, rax
call dbg.user_getdatestr
mov rdx, rax
lea rcx, str._Avviato_da:__s_n
call sym.printf
mov rcx, rbx
call dbg.mydelete2
call dbg.set_loginname
mov rax, qword [0x1004632d0]
mov dword [rax + 0xb808], 0xff
lea rdx, [rsp + 0x30]
mov ecx, 5
call sym.getrlimit
test eax, eax
js 0x10040e408
cmp qword [rsp + 0x38], 0xff
mov eax, 0xff
cmovbe rax, qword [rsp + 0x38]
mov qword [rsp + 0x30], rax
mov rdx, qword [0x1004632d0]
mov dword [rdx + 0xb808], eax
lea rdx, [rsp + 0x30]
mov ecx, 5
call sym.setrlimit
test eax, eax
jns 0x10040e428
call sym.__errno
mov ecx, dword [rax]
call sym.strerror
mov r9, rax
mov rax, qword [0x1004632d0]
mov r8d, dword [rax + 0xb808]
lea rdx, str.Non_posso_aggiustare_il_limite_fd_a__u:__s
mov ecx, 0
call dbg.outerror
jmp 0x10040e428
call sym.__errno
mov ecx, dword [rax]
call sym.strerror
mov r8, rax
lea rdx, str.Non_posso_leggere_il_limite_fd:__s
mov ecx, 0
call dbg.outerror
mov rax, qword [0x1004632d0]
mov r8d, dword [rax + 0xb808]
cmp r8d, 0xd
jg 0x10040e44d
lea rdx, str.Il_limite_fd_di__u__troppo_piccolo
mov ecx, 0
call dbg.outerror
mov rdx, qword [0x1004632d0]
mov eax, dword [rdx + 0xb808]
sub eax, 7
mov ecx, eax
shr ecx, 0x1f
add eax, ecx
sar eax, 1
mov dword [rdx + 0xb800], eax
cmp dword [rdx + 0xb768], 0
je 0x10040e501
lea rdx, [rsp + 0x30]
mov ecx, 4
call sym.getrlimit
test eax, eax
js 0x10040e4e1
mov rax, qword [rsp + 0x38]
mov qword [rsp + 0x30], rax
test rax, rax
jne 0x10040e4ac
lea rdx, str.Non_posso_settare_il_limite_core:_il_limite_hard__0
mov ecx, 2
call dbg.outerror
lea rdx, [rsp + 0x30]
mov ecx, 4
call sym.setrlimit
test eax, eax
jns 0x10040e501
call sym.__errno
mov ecx, dword [rax]
call sym.strerror
mov r8, rax
lea rdx, str.Non_posso_settare_il_limite_core:__s
mov ecx, 2
call dbg.outerror
jmp 0x10040e501
call sym.__errno
mov ecx, dword [rax]
call sym.strerror
mov r8, rax
lea rdx, str.Non_posso_leggere_il_limite_core:__s
mov ecx, 2
call dbg.outerror
call dbg.startup_dinoex
call dbg.getconfig
lea rcx, str.Iroffer_CWLabs_avviato_3.30__Win32__2.4.1___geoip6_gnutls_ruby
call dbg.mylog
call dbg.getos
mov rax, qword [0x1004632d0]
cmp qword [rax + 0x7730], 0
je 0x10040e54c
call dbg.read_statefile
mov ebx, eax
call dbg.import_xdccfile
add ebx, eax
je 0x10040e542
call dbg.write_statefile
call dbg.autotrigger_rebuild
call dbg.start_main_queue
mov rax, qword [0x1004632d0]
cmp dword [rax + 0x7964], 0
je 0x10040e561
call dbg.gobackground
mov rax, qword [0x1004632d0]
mov rcx, qword [rax + 0x7700]
test rcx, rcx
je 0x10040e579
call dbg.writepidfile
call sym.__getreent
mov rcx, qword [rax + 0x10]
call sym.fflush
mov rax, qword [0x1004632d0]
cmp dword [rax + 0x7964], 0
jne 0x10040e5d5
call sym.__getreent
mov rcx, qword [rax + 0x10]
call sym.fileno
mov edx, 1
mov ecx, eax
call dbg.set_socket_nonblocking
test eax, eax
jns 0x10040e5ea
call sym.__errno
mov ecx, dword [rax]
call sym.strerror
mov r8, rax
lea rdx, str.non_posso_settare_la_console_non_blocking_:__s
mov ecx, 1
call dbg.outerror
mov rax, qword [0x1004632d0]
cmp dword [rax + 0xb750], 0
jne 0x10040e62e
jmp 0x10040e674
call sym.__getreent
mov rcx, qword [rax + 0x10]
call sym.fileno
mov r8d, 2
mov edx, eax
mov rbx, qword [0x1004632d0]
lea rcx, [rbx + 0xa948]
call dbg.ir_boutput_init
mov dword [rbx + 0xb7a0], 1
call dbg.gotobot
call dbg.drawbot
call dbg.gototop
jmp 0x10040e5d5
mov rax, qword [0x1004632d0]
lea rbx, [rax + 0x48]
mov esi, 0
mov r12, qword [0x1004632e0]
mov ebp, 0xffffffff
mov rdi, rax
mov qword [r12], rbx
mov dword [rbx + 0xb28], 0
mov ecx, ebp
call dbg.switchserver
add esi, 1
add rbx, 0xb60
cmp dword [rdi + 0xb750], esi
ja 0x10040e64d
mov rax, qword [0x1004632e0]
mov qword [rax], 0
call dbg.config_dinoex
nop
add rsp, 0x60
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret