Function at 0x40dec0
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x3040
call fcn.0045d5a0
mov eax, dword [0x481a58]
xor eax, ebp
mov dword [ebp - 8], eax
mov dword [ebp - 0x3020], 0xffffffff
cmp dword [ebp + 8], 0
je 0x40def7
cmp dword [ebp + 8], 1
je 0x40def7
cmp dword [ebp + 8], 2
jne 0x40ebc2
cmp dword [ebp + 0x24], 1
jne 0x40df07
mov eax, dword [0x481354]
mov dword [ebp + 0x24], eax
jmp 0x40df0e
mov dword [ebp + 0x24], 0
mov dword [0x485528], 1
mov dword [ebp - 0x3020], 0xffffffff
mov ecx, dword [ebp + 0x20]
mov dword [ebp - 0x2c0c], ecx
mov edx, dword [ebp + 0x10]
mov dword [ebp - 0x301c], edx
cmp dword [ebp + 0x24], 1
jl 0x40df40
cmp dword [ebp + 0x24], 4
jle 0x40df4c
cmp dword [ebp + 0x24], 9
je 0x40df4c
cmp dword [ebp + 0x24], 8
jne 0x40df5e
mov dword [ebp - 0x301c], 0x48d478
mov eax, dword [0x481350]
mov dword [ebp + 0x20], eax
mov ecx, dword [ebp - 0x301c]
push ecx
call fcn.0045acf0
add esp, 4
test eax, eax
je 0x40e9df
mov edx, dword [ebp + 0x30]
push edx
push 0x4742d3
mov eax, dword [ebp + 0x20]
push eax
mov ecx, dword [ebp - 0x301c]
push ecx
call fcn.0040ef50
add esp, 0x10
mov dword [ebp - 0x3020], eax
cmp dword [ebp - 0x3020], 0xffffffff
je 0x40e9dd
mov dword [ebp - 0x3040], 0
push 4
lea edx, [ebp - 0x3040]
push edx
push 0x1001
push 0xffff
mov eax, dword [ebp - 0x3020]
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
push 4
lea ecx, [ebp - 0x3040]
push ecx
push 0x1002
push 0xffff
mov edx, dword [ebp - 0x3020]
push edx
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp dword [ebp + 8], 2
jne 0x40e05a
mov eax, dword [ebp + 0x30]
push eax
push 0xffffffffffffffff
mov ecx, dword [ebp - 0x3020]
push ecx
call fcn.00454a30
add esp, 0xc
test eax, eax
je 0x40e04e
lea edx, [ebp - 0x2808]
push edx
mov eax, dword [ebp + 0x30]
push eax
push 0x400
lea ecx, [ebp - 0x2c08]
push ecx
mov edx, dword [ebp - 0x3020]
push edx
call fcn.0044da60
add esp, 0x14
cdq
mov ecx, 0x64
idiv ecx
mov dword [ebp - 0x302c], eax
cmp dword [ebp - 0x302c], 1
jne 0x40e04c
jmp 0x40e00d
jmp 0x40e058
mov dword [ebp - 0x302c], 5
jmp 0x40e099
lea edx, [ebp - 0x2808]
push edx
mov eax, dword [ebp + 0x30]
push eax
push 0x400
lea ecx, [ebp - 0x2c08]
push ecx
mov edx, dword [ebp - 0x3020]
push edx
call fcn.0044da60
add esp, 0x14
cdq
mov ecx, 0x64
idiv ecx
mov dword [ebp - 0x302c], eax
cmp dword [ebp - 0x302c], 1
jne 0x40e099
jmp 0x40e05a
cmp dword [ebp - 0x302c], 2
jne 0x40e9b7
mov dword [ebp - 0x3024], 1
push 4
lea edx, [ebp - 0x3024]
push edx
push 0x100
push 0xffff
mov eax, dword [ebp - 0x3020]
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x40e0e9
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.setsockopt
call fcn.0044e210
add esp, 8
push 4
lea ecx, [ebp - 0x3024]
push ecx
push 1
push 6
mov edx, dword [ebp - 0x3020]
push edx
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x40e11c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.setsockopt
call fcn.0044e210
add esp, 8
mov dword [ebp - 0x3024], 1
push 4
lea eax, [ebp - 0x3024]
push eax
push 8
push 0xffff
mov ecx, dword [ebp - 0x3020]
push ecx
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x40e15c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.setsockopt
call fcn.0044e210
add esp, 8
cmp dword [0x48134c], 0
jle 0x40e1ce
mov dword [ebp - 0x3038], 1
mov edx, dword [0x48134c]
imul edx, edx, 0x3e8
mov dword [ebp - 0x3034], edx
mov dword [ebp - 0x3030], 0x3e8
push 0
push 0
lea eax, [ebp - 0x3014]
push eax
push 0
push 0
push 0xc
lea ecx, [ebp - 0x3038]
push ecx
push 0x98000004
mov edx, dword [ebp - 0x3020]
push edx
call dword [sym.imp.WS2_32.dll_WSAIoctl]
cmp eax, 0xffffffff
jne 0x40e1ce
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 0x4747cc
call fcn.0044e210
add esp, 8
mov eax, 1
mov word [ebp - 0x3018], ax
mov ecx, 0x5a
mov word [ebp - 0x3016], cx
push 4
lea edx, [ebp - 0x3018]
push edx
push 0x80
push 0xffff
mov eax, dword [ebp - 0x3020]
push eax
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x40e21f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.setsockopt
call fcn.0044e210
add esp, 8
mov dword [ebp - 0x302c], 2
cmp dword [ebp + 0x24], 1
je 0x40e23f
cmp dword [ebp + 0x24], 2
je 0x40e23f
cmp dword [ebp + 0x24], 8
jne 0x40e2c6
push 0x48d4d0
push str.USER__s
mov ecx, dword [ebp + 0x30]
push ecx
lea edx, [ebp - 0x3010]
push edx
mov eax, dword [ebp - 0x3020]
push eax
call fcn.0044d800
add esp, 0x14
cdq
mov ecx, 0x64
idiv ecx
mov dword [ebp - 0x302c], eax
cmp dword [ebp - 0x302c], 3
jne 0x40e2c4
mov edx, dword [0x481358]
push edx
lea eax, [ebp - 0x3010]
push eax
push 0x48d528
call fcn.0040ebe0
add esp, 0xc
lea ecx, [ebp - 0x3010]
push ecx
push str.PASS__s
mov edx, dword [ebp + 0x30]
push edx
push 0
mov eax, dword [ebp - 0x3020]
push eax
call fcn.0044d800
add esp, 0x14
cdq
mov ecx, 0x64
idiv ecx
mov dword [ebp - 0x302c], eax
jmp 0x40e30d
cmp dword [ebp + 0x24], 9
jne 0x40e30d
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [0x48135c]
push eax
push 0x48d528
push 0x48d4d0
push str.USER__s:_s_c_s
mov ecx, dword [ebp + 0x30]
push ecx
lea edx, [ebp - 0x3010]
push edx
mov eax, dword [ebp - 0x3020]
push eax
call fcn.0044d800
add esp, 0x20
cdq
mov ecx, 0x64
idiv ecx
mov dword [ebp - 0x302c], eax
cmp dword [ebp - 0x302c], 2
je 0x40e34a
cmp dword [ebp - 0x302c], 3
je 0x40e34a
push str.FireWall.
call fcn.00456c30
add esp, 4
mov edx, dword [ebp - 0x3020]
push edx
call fcn.0044d330
add esp, 4
mov dword [ebp - 0x3020], 0xffffffff
jmp 0x40e9b5
cmp dword [ebp + 0x24], 1
je 0x40e35a
cmp dword [ebp + 0x24], 4
jne 0x40e412
mov dword [ebp - 0x3024], 0
cmp dword [ebp + 0x24], 4
jne 0x40e374
mov dword [ebp - 0x3024], 2
cmp dword [0x48d580], 1
jne 0x40e38c
mov eax, dword [ebp - 0x3024]
add eax, 1
mov dword [ebp - 0x3024], eax
cmp dword [ebp - 0x2c0c], 0x15
jne 0x40e3d1
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp - 0x3024]
mov eax, dword [edx*4 + 0x4801b0]
push eax
push str._s__s
mov ecx, dword [ebp + 0x30]
push ecx
push 0
mov edx, dword [ebp - 0x3020]
push edx
call fcn.0044d800
add esp, 0x18
cdq
mov ecx, 0x64
idiv ecx
mov dword [ebp - 0x302c], eax
jmp 0x40e412
mov edx, dword [ebp - 0x2c0c]
push edx
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp - 0x3024]
mov edx, dword [ecx*4 + 0x4801b0]
push edx
push str._s__s__d
mov eax, dword [ebp + 0x30]
push eax
push 0
mov ecx, dword [ebp - 0x3020]
push ecx
call fcn.0044d800
add esp, 0x1c
cdq
mov ecx, 0x64
idiv ecx
mov dword [ebp - 0x302c], eax
cmp dword [ebp - 0x302c], 2
je 0x40e453
cmp dword [ebp - 0x302c], 3
je 0x40e453
mov edx, dword [ebp + 0x10]
push edx
push 0x474748
call fcn.00456c30
add esp, 8
mov eax, dword [ebp - 0x3020]
push eax
call fcn.0044d330
add esp, 4
mov dword [ebp - 0x3020], 0xffffffff
jmp 0x40e9b5
mov dword [ebp - 4], 0
mov ecx, dword [ebp + 0x14]
push ecx
call fcn.0045acf0
add esp, 4
test eax, eax
jne 0x40e4a1
mov edx, dword [ebp + 0xc]
cmp dword [edx + 0x23f0], 0
jne 0x40e917
push 1
lea eax, [ebp - 4]
push eax
push 0x51
mov ecx, dword [ebp + 0x14]
push ecx
push 0
call fcn.00431b60
push eax
push 0x7c
call fcn.0043cb10
add esp, 0x1c
cmp eax, 1
jne 0x40e917
cmp dword [ebp - 4], 1
jne 0x40e4c9
push 0x47449c
mov edx, dword [ebp + 0x14]
push edx
call fcn.0045ad80
add esp, 8
push 0x480530
mov eax, dword [ebp + 0x18]
push eax
call fcn.0045ad80
add esp, 8
cmp dword [ebp + 0x24], 2
je 0x40e4d5
cmp dword [ebp + 0x24], 3
jne 0x40e52f
cmp dword [ebp - 0x2c0c], 0x15
jne 0x40e503
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [0x48135c]
push edx
mov eax, dword [ebp + 0x14]
push eax
push str._s_c_s
lea ecx, [ebp - 0x2c08]
push ecx
call fcn.0045b942
add esp, 0x14
jmp 0x40e52d
mov edx, dword [ebp - 0x2c0c]
push edx
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [0x48135c]
push ecx
mov edx, dword [ebp + 0x14]
push edx
push str._s_c_s__d
lea eax, [ebp - 0x2c08]
push eax
call fcn.0045b942
add esp, 0x18
jmp 0x40e542
mov ecx, dword [ebp + 0x14]
push ecx
lea edx, [ebp - 0x2c08]
push edx
call fcn.0045ad80
add esp, 8
cmp dword [ebp + 8], 1
jne 0x40e66a
call fcn.004543f0
test eax, eax
je 0x40e660
push str.AUTH_TLS
mov eax, dword [ebp + 0x30]
push eax
lea ecx, [ebp - 0x3010]
push ecx
mov edx, dword [ebp - 0x3020]
push edx
call fcn.0044d800
add esp, 0x10
mov dword [ebp - 0x302c], eax
cmp dword [ebp - 0x302c], 0xea
je 0x40e5bf
push str.AUTH_SSL
mov eax, dword [ebp + 0x30]
push eax
lea ecx, [ebp - 0x3010]
push ecx
mov edx, dword [ebp - 0x3020]
push edx
call fcn.0044d800
add esp, 0x10
mov dword [ebp - 0x302c], eax
cmp dword [ebp - 0x302c], 0xea
jne 0x40e660
mov eax, dword [ebp + 0x30]
push eax
push 0xffffffffffffffff
mov ecx, dword [ebp - 0x3020]
push ecx
call fcn.00454a30
add esp, 0xc
test eax, eax
je 0x40e654
push str.PBSZ_0
mov edx, dword [ebp + 0x30]
push edx
lea eax, [ebp - 0x3010]
push eax
mov ecx, dword [ebp - 0x3020]
push ecx
call fcn.0044d800
add esp, 0x10
mov dword [ebp - 0x302c], eax
cmp dword [ebp - 0x302c], 0xc8
jne 0x40e648
push str.PROT_P
mov edx, dword [ebp + 0x30]
push edx
lea eax, [ebp - 0x3010]
push eax
mov ecx, dword [ebp - 0x3020]
push ecx
call fcn.0044d800
add esp, 0x10
mov dword [ebp - 0x302c], eax
cmp dword [ebp - 0x302c], 0xc8
jne 0x40e63c
jmp 0x40e646
mov dword [ebp - 0x302c], 5
jmp 0x40e652
mov dword [ebp - 0x302c], 5
jmp 0x40e65e
mov dword [ebp - 0x302c], 5
jmp 0x40e66a
mov dword [ebp - 0x302c], 5
cmp dword [ebp + 8], 2
jne 0x40e6c6
push str.PBSZ_0
mov edx, dword [ebp + 0x30]
push edx
lea eax, [ebp - 0x3010]
push eax
mov ecx, dword [ebp - 0x3020]
push ecx
call fcn.0044d800
add esp, 0x10
mov dword [ebp - 0x302c], eax
cmp dword [ebp - 0x302c], 0xc8
jne 0x40e6c6
push str.PROT_P
mov edx, dword [ebp + 0x30]
push edx
lea eax, [ebp - 0x3010]
push eax
mov ecx, dword [ebp - 0x3020]
push ecx
call fcn.0044d800
add esp, 0x10
mov dword [ebp - 0x302c], eax
mov dword [ebp - 0x3028], 0
cmp dword [ebp - 0x302c], 5
jne 0x40e6de
jmp 0x40e915
mov dword [ebp - 0x303c], 0
lea edx, [ebp - 0x2c08]
push edx
push str.USER__s
mov eax, dword [ebp + 0x30]
push eax
lea ecx, [ebp - 0x3010]
push ecx
mov edx, dword [ebp - 0x3020]
push edx
call fcn.0044d800
add esp, 0x14
cdq
mov ecx, 0x64
idiv ecx
mov dword [ebp - 0x302c], eax
cmp dword [ebp - 0x302c], 3
jne 0x40e8f5
mov edx, dword [ebp + 0x18]
push edx
call fcn.0045acf0
add esp, 4
test eax, eax
jne 0x40e770
mov eax, dword [ebp + 0xc]
cmp dword [eax + 0x23f0], 0
jne 0x40e8de
push 1
lea ecx, [ebp - 4]
push ecx
push 0x51
mov edx, dword [ebp + 0x18]
push edx
push 0
call fcn.00431b60
push eax
push 0x7b
call fcn.0043cb10
add esp, 0x1c
cmp eax, 1
jne 0x40e8de
mov eax, dword [ebp + 0x2c]
push eax
lea ecx, [ebp - 0x3010]
push ecx
mov edx, dword [ebp + 0x18]
push edx
call fcn.0040ebe0
add esp, 0xc
push 0x474708
lea eax, [ebp - 0x3010]
push eax
call fcn.0045b2f0
add esp, 8
test eax, eax
jne 0x40e7b3
push 0x4742d3
lea ecx, [ebp - 0x3010]
push ecx
call fcn.0045ad80
add esp, 8
lea edx, [ebp - 0x3010]
push edx
push str.PASS__s
mov eax, dword [ebp + 0x30]
push eax
push 0
mov ecx, dword [ebp - 0x3020]
push ecx
call fcn.0044d800
add esp, 0x14
cdq
mov ecx, 0x64
idiv ecx
mov dword [ebp - 0x302c], eax
cmp dword [ebp - 0x302c], 5
jne 0x40e856
push 0x4742d3
mov edx, dword [ebp + 0x18]
push edx
call fcn.0045ad80
add esp, 8
mov eax, dword [ebp + 0xc]
cmp dword [eax + 0x23f0], 0
jne 0x40e83a
push 1
lea ecx, [ebp - 4]
push ecx
push 0x51
mov edx, dword [ebp + 0x18]
push edx
push 0
call fcn.00431b60
push eax
push 0x92
call fcn.0043cb10
add esp, 0x1c
cmp eax, 1
jne 0x40e83a
mov dword [ebp - 0x303c], 1
jmp 0x40e847
push str.No_password_specified.
call fcn.00456e80
add esp, 4
mov dword [ebp - 0x3028], 1
jmp 0x40e8dc
cmp dword [ebp - 0x302c], 3
jne 0x40e8dc
mov eax, dword [ebp + 0x1c]
push eax
call fcn.0045acf0
add esp, 4
test eax, eax
jne 0x40e8a1
mov ecx, dword [ebp + 0xc]
cmp dword [ecx + 0x23f0], 0
jne 0x40e8cf
push 1
lea edx, [ebp - 4]
push edx
push 0x51
mov eax, dword [ebp + 0x1c]
push eax
push 0
call fcn.00431b60
push eax
push 0x97
call fcn.0043cb10
add esp, 0x1c
cmp eax, 1
jne 0x40e8cf
mov ecx, dword [ebp + 0x1c]
push ecx
push str.ACCT__s
mov edx, dword [ebp + 0x30]
push edx
push 0
mov eax, dword [ebp - 0x3020]
push eax
call fcn.0044d800
add esp, 0x14
cdq
mov ecx, 0x64
idiv ecx
mov dword [ebp - 0x302c], eax
jmp 0x40e8dc
push str.No_account_specified
call fcn.00456e80
add esp, 4
jmp 0x40e8f5
mov dword [ebp - 0x302c], 5
push str.No_password_specified.
call fcn.00456e80
add esp, 4
cmp dword [ebp - 0x303c], 1
jne 0x40e908
mov dword [ebp - 0x302c], 2
cmp dword [ebp - 0x303c], 1
je 0x40e6d0
jmp 0x40e92e
mov dword [ebp - 0x302c], 5
push str.No_user_name_specified
call fcn.00456e80
add esp, 4
cmp dword [ebp - 0x302c], 2
je 0x40e963
mov edx, dword [ebp + 0x10]
push edx
push 0x474698
call fcn.00456c30
add esp, 8
mov eax, dword [ebp - 0x3020]
push eax
call fcn.0044d330
add esp, 4
mov dword [ebp - 0x3020], 0xffffffff
jmp 0x40e9b5
cmp dword [ebp + 0x28], 1
jne 0x40e9b5
cmp dword [ebp - 0x3028], 1
jne 0x40e9b5
mov ecx, dword [ebp + 0xc]
cmp dword [ecx + 0x23f0], 0
jne 0x40e9b5
push 0
push 0x43ce40
call fcn.00431b60
push eax
push 0x93
call fcn.00431b80
push eax
call fcn.0043a6f0
add esp, 0x14
cmp eax, 1
jne 0x40e9b5
mov edx, dword [ebp + 0x18]
push edx
call fcn.0042db90
push eax
call fcn.0042da20
add esp, 8
jmp 0x40e9dd
push 0x474680
call fcn.00456c30
add esp, 4
mov eax, dword [ebp - 0x3020]
push eax
call fcn.0044d330
add esp, 4
mov dword [ebp - 0x3020], 0xffffffff
jmp 0x40ea0d
cmp dword [ebp + 0x24], 1
jl 0x40e9eb
cmp dword [ebp + 0x24], 4
jle 0x40e9f1
cmp dword [ebp + 0x24], 8
jne 0x40ea00
push 0x474648
call fcn.00456c30
add esp, 4
jmp 0x40ea0d
push 0x474628
call fcn.00456c30
add esp, 4
mov dword [0x485528], 0
cmp dword [ebp - 0x3020], 0xffffffff
je 0x40ebc2
push str.FEAT
mov ecx, dword [ebp + 0x30]
push ecx
lea edx, [ebp - 0x3010]
push edx
mov eax, dword [ebp - 0x3020]
push eax
call fcn.0044d800
add esp, 0x10
mov dword [ebp - 0x302c], eax
cmp dword [ebp - 0x302c], 0xd3
jne 0x40eb6a
push str._UTF8
lea ecx, [ebp - 0x3010]
push ecx
call fcn.0045d5d0
add esp, 8
test eax, eax
je 0x40ea86
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0x23f4]
or eax, 1
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 0x23f4], eax
push str._MLST
lea edx, [ebp - 0x3010]
push edx
call fcn.0045d5d0
add esp, 8
test eax, eax
jne 0x40eab6
push str._MLSD
lea eax, [ebp - 0x3010]
push eax
call fcn.0045d5d0
add esp, 8
test eax, eax
je 0x40eacb
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x23f4]
or edx, 2
mov eax, dword [ebp + 0xc]
mov dword [eax + 0x23f4], edx
push str._EPRT
lea ecx, [ebp - 0x3010]
push ecx
call fcn.0045d5d0
add esp, 8
test eax, eax
jne 0x40eafb
push str._EPSV
lea edx, [ebp - 0x3010]
push edx
call fcn.0045d5d0
add esp, 8
test eax, eax
je 0x40eb10
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x23f4]
or ecx, 0xc
mov edx, dword [ebp + 0xc]
mov dword [edx + 0x23f4], ecx
push str._MDTM
lea eax, [ebp - 0x3010]
push eax
call fcn.0045d5d0
add esp, 8
test eax, eax
je 0x40eb3d
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x23f4]
or edx, 0x10
mov eax, dword [ebp + 0xc]
mov dword [eax + 0x23f4], edx
push str._MFMT
lea ecx, [ebp - 0x3010]
push ecx
call fcn.0045d5d0
add esp, 8
test eax, eax
je 0x40eb6a
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0x23f4]
or eax, 0x20
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 0x23f4], eax
mov edx, dword [ebp + 0xc]
cmp dword [edx + 0x128c], 0xffffffff
jne 0x40ebc2
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x23f4]
and ecx, 1
je 0x40ebc2
push str.OPTS_UTF8_ON
mov edx, dword [ebp + 0x30]
push edx
lea eax, [ebp - 0x3010]
push eax
mov ecx, dword [ebp - 0x3020]
push ecx
call fcn.0044d800
add esp, 0x10
mov dword [ebp - 0x302c], eax
cmp dword [ebp - 0x302c], 0xc8
jne 0x40ebc2
mov edx, dword [ebp + 0xc]
mov dword [edx + 0x128c], 5
mov eax, dword [ebp - 0x3020]
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0045a968
mov esp, ebp
pop ebp
ret