Function at 0x41fb60
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
xor esi, esi
push ebx
sub esp, 0x5c
mov dword [esp + 8], 0xa1c
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x3c], 0
mov dword [esp + 4], 0x41f768
mov dword [esp], 0x418370
call sym._updatecontext_f
call sym._getpid
mov ebx, dword [0x4314b4]
mov edi, eax
mov ecx, 0x68db8bad
imul edi, edi, 0x1388
mov eax, ebx
imul ecx
mov ecx, ebx
sar ecx, 0x1f
mov dword [ebp - 0x4c], edx
mov edx, dword [ebp - 0x4c]
mov dword [ebp - 0x50], eax
sar edx, 0xb
sub edx, ecx
imul edx, edx, 0x1388
sub ebx, edx
lea eax, [ebx + edi]
mov dword [esp], eax
call sym._srand
mov eax, dword [0x43127c]
test eax, eax
je 0x420421
mov dword [esp], 0xa
call sym._putchar
mov eax, dword [0x43127c]
test eax, eax
jne 0x41fc0d
mov eax, dword [0x431430]
test eax, eax
je 0x420410
mov dword [esp], 0x41f790
call sym._puts
mov eax, dword [0x43127c]
test eax, eax
jne 0x41fc2f
mov eax, dword [0x431430]
test eax, eax
je 0x4203f8
mov dword [esp], 0xa
lea edi, [ebp - 0x28]
call sym._putchar
cld
xor eax, eax
mov ecx, 3
rep stosd dword es:[edi], eax
mov dword [ebp - 0x28], sym._iroffer_signal_handler
lea ebx, [ebp - 0x28]
lea eax, [ebp - 0x24]
mov dword [ebp - 0x20], 2
mov dword [esp], eax
call sym._sigfillset
mov dword [esp + 8], 0
mov dword [esp + 4], ebx
mov dword [esp], 0xa
call sym._sigaction
mov dword [esp + 8], 0
mov dword [esp + 4], ebx
mov dword [esp], 6
call sym._sigaction
mov dword [esp + 8], 0
mov dword [esp + 4], ebx
mov dword [esp], 4
call sym._sigaction
mov dword [esp + 8], 0
mov dword [esp + 4], ebx
mov dword [esp], 8
call sym._sigaction
mov dword [esp + 8], 0
mov dword [esp + 4], ebx
mov dword [esp], 0xb
call sym._sigaction
mov dword [esp + 8], 0
mov dword [esp + 4], ebx
mov dword [esp], 0xf
call sym._sigaction
mov dword [esp + 8], 0
mov dword [esp + 4], ebx
mov dword [esp], 2
call sym._sigaction
mov dword [esp + 8], 0
mov dword [esp + 4], ebx
mov dword [esp], 0x1e
call sym._sigaction
mov dword [esp + 8], 0
mov dword [esp + 4], ebx
mov dword [esp], 0x1f
call sym._sigaction
mov dword [esp + 8], 0
mov dword [esp + 4], ebx
mov dword [esp], 0x14
call sym._sigaction
mov dword [esp + 4], 1
mov dword [esp], 0xd
call sym._signal
mov dword [esp + 4], 1
mov dword [esp], 0xe
call sym._signal
mov dword [esp + 4], 1
mov dword [esp], 1
call sym._signal
mov dword [esp + 4], 1
mov dword [esp], 0x12
call sym._signal
mov dword [esp], 0x41f7f0
call sym._puts
mov dword [esp], 0x41f864
call sym._puts
mov eax, dword [0x432f60]
test eax, eax
jne 0x420361
mov eax, dword [0x432f5c]
test eax, eax
jne 0x4202d7
mov eax, dword [0x432f60]
test eax, eax
jne 0x4201c0
call sym._geteuid
test eax, eax
je 0x4201a6
mov eax, dword [0x43127c]
test eax, eax
je 0x420183
mov dword [esp + 0xc], 0xaa2
mov edi, 0xff
mov dword [esp + 8], 0x418370
mov dword [esp + 4], 0x41f768
mov dword [esp], 0x200
call sym._mycalloc2
mov dword [esp], eax
mov ebx, eax
mov dword [esp + 8], 0x200
mov dword [esp + 4], 0
call sym._getdatestr
mov dword [esp + 4], eax
mov dword [esp], 0x41f878
call sym._printf
mov dword [esp], ebx
lea ebx, [ebp - 0x30]
call sym._mydelete2
call sym._set_loginname
mov dword [0x431778], edi
mov dword [esp + 4], ebx
mov dword [esp], 5
call sym._getrlimit
test eax, eax
js 0x420157
mov eax, dword [ebp - 0x2c]
cmp eax, 0xff
jbe 0x41fe8d
mov eax, 0xff
mov dword [ebp - 0x30], eax
mov dword [0x431778], eax
mov dword [esp + 4], ebx
mov dword [esp], 5
call sym._setrlimit
test eax, eax
js 0x420122
mov ecx, dword [0x431778]
lea eax, [ecx - 0x12]
mov edx, eax
shr edx, 0x1f
add eax, edx
sar eax, 1
test eax, eax
jle 0x420105
mov esi, dword [0x43141c]
test esi, esi
jne 0x420070
call sym._getconfig
mov dword [esp + 4], 0x41f890
mov dword [esp], 0
call sym._mylog
mov eax, dword [0x431298]
mov dword [esp], eax
call sym._getxdccconfig
call sym._getos
mov ecx, dword [0x4312f8]
test ecx, ecx
jne 0x420020
mov edx, dword [0x4312fc]
test edx, edx
jne 0x420010
mov eax, dword [0x43127c]
test eax, eax
jne 0x420005
mov eax, dword [0x43129c]
test eax, eax
jne 0x41fff8
mov eax, dword [0x43127c]
test eax, eax
je 0x41ff60
mov dword [esp], 0xffffffff
xor eax, eax
mov dword [0x4313e0], eax
call sym._switchserver
call sym._highestsock
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
call sym.___getreent
mov eax, dword [eax + 8]
mov dword [esp], eax
call sym._fileno
mov dword [esp], eax
mov dword [esp + 4], 1
call sym._set_socket_nonblocking
test eax, eax
js 0x41ffcc
call sym.___getreent
mov eax, dword [eax + 8]
mov dword [esp], eax
call sym._fflush
mov dword [esp + 0xc], 0xb06
mov dword [esp + 8], 0x418370
mov dword [esp + 4], 0x41f768
mov dword [esp], 0x40000
call sym._mycalloc2
mov dword [0x431488], eax
mov eax, 1
mov dword [0x43147c], eax
jmp 0x41ff3f
call sym.___errno
mov eax, dword [eax]
mov dword [esp], eax
call sym._strerror
mov dword [esp + 8], eax
mov dword [esp + 4], 0x41f8d0
mov dword [esp], 1
call sym._outerror
jmp 0x41ff3f
mov dword [esp], eax
call sym._writepidfile
jmp 0x41ff36
call sym._gobackground
jmp 0x41ff29
call sym._read_ignorefile
jmp 0x41ff1c
mov dword [esp + 0xc], 0xaec
mov dword [esp + 8], 0x418370
mov dword [esp + 4], 0x41f768
mov dword [esp], 0x200
call sym._mycalloc2
mov dword [esp], eax
mov ebx, eax
mov dword [esp + 4], 0x200
call sym._msglog_howmany
mov dword [esp], ebx
call sym._puts
mov dword [esp], ebx
call sym._mydelete2
jmp 0x41ff0e
mov dword [esp + 4], ebx
mov dword [esp], 4
call sym._getrlimit
test eax, eax
js 0x4200e8
mov eax, dword [ebx + 4]
test eax, eax
mov dword [ebp - 0x30], eax
je 0x4200d2
mov dword [esp + 4], ebx
mov dword [esp], 4
call sym._setrlimit
test eax, eax
jns 0x41fed5
call sym.___errno
mov eax, dword [eax]
mov dword [esp], eax
call sym._strerror
mov dword [esp + 8], eax
mov dword [esp + 4], 0x41f910
mov dword [esp], 2
call sym._outerror
jmp 0x41fed5
mov dword [esp + 4], 0x41f930
mov dword [esp], 2
call sym._outerror
jmp 0x42008e
call sym.___errno
mov eax, dword [eax]
mov dword [esp], eax
call sym._strerror
mov dword [esp + 8], eax
mov dword [esp + 4], 0x41f95a
jmp 0x4200c1
mov dword [esp + 8], ecx
mov dword [esp + 4], 0x41f978
mov dword [esp], 0
call sym._outerror
jmp 0x41fec7
call sym.___errno
mov eax, dword [eax]
mov dword [esp], eax
call sym._strerror
mov dword [esp + 0xc], eax
mov eax, dword [0x431778]
mov dword [esp + 4], 0x41f9b0
mov dword [esp], 2
mov dword [esp + 8], eax
call sym._outerror
jmp 0x41fead
call sym.___errno
mov eax, dword [eax]
mov dword [esp], eax
call sym._strerror
mov dword [esp + 8], eax
mov dword [esp + 4], 0x41f9d4
mov dword [esp], 2
call sym._outerror
jmp 0x41fead
mov dword [esp], 0x41f9f0
mov eax, dword [0x43142c]
mov dword [esp + 8], eax
mov eax, dword [0x431428]
mov dword [esp + 4], eax
call sym._printf
jmp 0x41fdfd
mov dword [esp + 4], 0x41fa10
mov dword [esp], 0
call sym._outerror
jmp 0x41fdf0
mov dword [esp + 4], eax
mov edx, dword [ebp - 0x38]
xor ebx, ebx
mov dword [esp], 0x41fa50
mov dword [esp + 0xc], edx
mov edx, dword [ebp - 0x34]
mov dword [esp + 8], edx
call sym._printf
cmp ebx, esi
jl 0x4202b7
mov dword [esp], 0x41fa88
call sym._puts
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call sym._setgid
test eax, eax
js 0x42028b
mov dword [esp], esi
mov edx, dword [ebp - 0x3c]
mov dword [esp + 4], edx
call sym._setgroups
test eax, eax
js 0x420262
mov eax, dword [ebp - 0x34]
mov dword [esp], eax
call sym._setuid
test eax, eax
js 0x420239
mov edx, dword [ebp - 0x3c]
mov dword [esp], edx
call sym._mydelete2
jmp 0x41fde3
call sym.___errno
mov eax, dword [eax]
mov dword [esp], eax
call sym._strerror
mov dword [esp + 8], eax
mov dword [esp + 4], 0x41fa8b
mov dword [esp], 0
call sym._outerror
jmp 0x420229
call sym.___errno
mov eax, dword [eax]
mov dword [esp], eax
call sym._strerror
mov dword [esp + 8], eax
mov dword [esp + 4], 0x41faa4
mov dword [esp], 0
call sym._outerror
jmp 0x42021a
call sym.___errno
mov eax, dword [eax]
mov dword [esp], eax
call sym._strerror
mov dword [esp + 8], eax
mov dword [esp + 4], 0x41fabd
mov dword [esp], 0
call sym._outerror
jmp 0x420207
mov edx, dword [ebp - 0x3c]
mov eax, dword [edx + ebx*4]
inc ebx
mov dword [esp], 0x41fad4
mov dword [esp + 4], eax
call sym._printf
cmp ebx, esi
jl 0x4202b7
jmp 0x4201e8
mov dword [esp + 4], eax
mov dword [esp], 0x41faf0
call sym._printf
mov eax, dword [0x432f5c]
mov dword [esp], eax
call sym._chroot
test eax, eax
js 0x420338
mov dword [esp], 0x41fb16
call sym._chdir
test eax, eax
jns 0x41fdd6
call sym.___errno
mov eax, dword [eax]
mov dword [esp], eax
call sym._strerror
mov dword [esp + 8], eax
mov dword [esp + 4], 0x41fb18
mov dword [esp], 0
call sym._outerror
jmp 0x41fdd6
call sym.___errno
mov eax, dword [eax]
mov dword [esp], eax
call sym._strerror
mov dword [esp + 8], eax
mov dword [esp + 4], 0x41fb28
mov dword [esp], 0
call sym._outerror
jmp 0x4202f8
mov dword [esp], eax
call sym._getpwnam
test eax, eax
mov ebx, eax
je 0x4203b1
mov edx, dword [ebx + 8]
mov esi, 1
mov ebx, dword [ebx + 0xc]
mov dword [esp + 0xc], 0xa59
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x38], ebx
mov dword [esp + 8], 0x418370
mov dword [esp + 4], 0x41f768
mov dword [esp], 4
call sym._mycalloc2
mov dword [ebp - 0x3c], eax
mov edx, dword [ebp - 0x38]
mov dword [eax], edx
jmp 0x41fdc9
mov eax, dword [0x432f60]
mov dword [esp], eax
call sym._atoi
mov dword [esp], eax
call sym._getpwuid
test eax, eax
mov ebx, eax
jne 0x42036f
call sym.___errno
mov eax, dword [eax]
mov dword [esp], eax
call sym._strerror
mov dword [esp + 8], eax
mov dword [esp + 4], 0x41fb39
mov dword [esp], 0
call sym._outerror
jmp 0x42036f
mov dword [esp], 0x41fb4f
call sym._printf
jmp 0x41fc2f
mov dword [esp], 0x41fb54
call sym._printf
jmp 0x41fc0d
mov dword [esp], 1
call sym._initscreen
call sym._gotobot
call sym._gototop
jmp 0x41fbeb